Skip to content

Commit

Permalink
Remove if invalidated and we have background processing or the config…
Browse files Browse the repository at this point in the history
…uration changes.
  • Loading branch information
lordofhyphens committed Mar 10, 2017
1 parent 375e880 commit 05e9991
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/Slic3r/GUI/Plater.pm
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ sub new {
$grid_sizer->AddGrowableCol(3, 1);
$print_info_sizer->Add($grid_sizer, 0, wxEXPAND);
my @info = (
fil_mm => "Used Filament (mm)",
fil_mm3 => "Used Filament (mm^3)",
fil_g => "Used Filament (g)",
cost => "Cost",
Expand Down Expand Up @@ -1123,6 +1124,10 @@ sub async_apply_config {
if ($invalidated) {
# kill current thread if any
$self->stop_background_process;
# remove the sliced statistics box because something changed.
if ($self->{"right_sizer"}) {
$self->{"right_sizer"}->Hide($self->{"sliced_info_box"});
}
} else {
$self->resume_background_process;
}
Expand Down Expand Up @@ -1394,6 +1399,7 @@ sub on_export_completed {
$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_mm3"}->SetLabel(sprintf("%.2f" , $self->{print}->total_extruded_volume));
$self->{"print_info_fil_mm"}->SetLabel(sprintf("%.2f" , $self->{print}->total_used_filament));

# this updates buttons status
$self->object_list_changed;
Expand Down Expand Up @@ -1666,6 +1672,9 @@ sub on_config_change {
$self->Layout;
}
}
if ($self->{"right_sizer"}) {
$self->{"right_sizer"}->Hide($self->{"sliced_info_box"});
}

return if !$self->GetFrame->is_loaded;

Expand Down

0 comments on commit 05e9991

Please sign in to comment.