diff options
author | bubnikv <bubnikv@gmail.com> | 2017-02-17 17:00:01 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-02-17 17:00:01 +0300 |
commit | 31f213d6ca8de9e450bf399daa044a2704ec6f3e (patch) | |
tree | e7faf878a101a6d176ffb5a7570d72fb5ff026c8 | |
parent | 17ea15eb6f10299cc94678cbec6b06b2567ae5c0 (diff) |
Hopefully fixes "Export G-Code" Disabled After First Export"
https://github.com/prusa3d/Slic3r/issues/137
-rw-r--r-- | lib/Slic3r/GUI/Plater.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index b0d6130fc..8d7c96a77 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1787,12 +1787,10 @@ sub object_list_changed { $self->{"btn_layer_editing"}->Disable if (! $self->{config}->variable_layer_height); } - if ($self->{export_gcode_output_file} || $self->{send_gcode_file}) { - $self->{btn_reslice}->Disable; - $self->{btn_export_gcode}->Disable; - $self->{btn_print}->Disable; - $self->{btn_send_gcode}->Disable; - } + my $export_in_progress = $self->{export_gcode_output_file} || $self->{send_gcode_file}; + my $method = ($have_objects && ! $export_in_progress) ? 'Enable' : 'Disable'; + $self->{"btn_$_"}->$method + for grep $self->{"btn_$_"}, qw(reslice export_gcode print send_gcode); } sub selection_changed { |