|
@@ -435,7 +435,7 @@ sub new {
|
|
|
|
|
|
my $print_info_sizer;
|
|
|
{
|
|
|
- my $box = Wx::StaticBox->new($self, -1, "Sliced Info");
|
|
|
+ my $box = Wx::StaticBox->new($self, -1, "Print Summary");
|
|
|
$print_info_sizer = Wx::StaticBoxSizer->new($box, wxVERTICAL);
|
|
|
$print_info_sizer->SetMinSize([350,-1]);
|
|
|
my $grid_sizer = Wx::FlexGridSizer->new(2, 2, 5, 5);
|
|
@@ -444,9 +444,7 @@ sub new {
|
|
|
$grid_sizer->AddGrowableCol(3, 1);
|
|
|
$print_info_sizer->Add($grid_sizer, 0, wxEXPAND);
|
|
|
my @info = (
|
|
|
- fil_cm => "Used Filament (cm)",
|
|
|
- fil_cm3 => "Used Filament (cm^3)",
|
|
|
- fil_g => "Used Filament (g)",
|
|
|
+ fil => "Used Filament",
|
|
|
cost => "Cost",
|
|
|
);
|
|
|
while (my $field = shift @info) {
|
|
@@ -1398,10 +1396,22 @@ sub on_export_completed {
|
|
|
$self->send_gcode if $send_gcode;
|
|
|
$self->{print_file} = undef;
|
|
|
$self->{send_gcode_file} = undef;
|
|
|
- $self->{"print_info_cost"}->SetLabel(sprintf("%.2f" , $self->{print}->total_cost));
|
|
|
- $self->{"print_info_fil_g"}->SetLabel(sprintf("%.2f" , $self->{print}->total_weight));
|
|
|
- $self->{"print_info_fil_cm3"}->SetLabel(sprintf("%.2f" , $self->{print}->total_extruded_volume) / 1000);
|
|
|
- $self->{"print_info_fil_cm"}->SetLabel(sprintf("%.2f" , $self->{print}->total_used_filament) / 10);
|
|
|
+
|
|
|
+ {
|
|
|
+ my $fil = sprintf(
|
|
|
+ '%.2fcm (%.2fcm³%s)',
|
|
|
+ $self->{print}->total_used_filament / 10,
|
|
|
+ $self->{print}->total_extruded_volume / 1000,
|
|
|
+ $self->{print}->total_weight
|
|
|
+ ? sprintf(', %.2fg', $self->{print}->total_weight)
|
|
|
+ : '',
|
|
|
+ );
|
|
|
+ my $cost = $self->{print}->total_cost
|
|
|
+ ? sprintf("%.2f" , $self->{print}->total_cost)
|
|
|
+ : 'n.a.';
|
|
|
+ $self->{print_info_fil}->SetLabel($fil);
|
|
|
+ $self->{print_info_cost}->SetLabel($cost);
|
|
|
+ }
|
|
|
|
|
|
# this updates buttons status
|
|
|
$self->object_list_changed;
|