Disable the "Export G-code" and "Send to print" buttons when other actions are pending
This commit is contained in:
parent
0775960b9f
commit
6c7c089fc4
@ -1001,6 +1001,9 @@ sub export_gcode {
|
|||||||
$self->on_export_completed($result);
|
$self->on_export_completed($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# this updates buttons status
|
||||||
|
$self->object_list_changed;
|
||||||
|
|
||||||
return $self->{export_gcode_output_file};
|
return $self->{export_gcode_output_file};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1080,6 +1083,9 @@ sub on_export_completed {
|
|||||||
|
|
||||||
$self->send_gcode if $send_gcode;
|
$self->send_gcode if $send_gcode;
|
||||||
$self->{send_gcode_file} = undef;
|
$self->{send_gcode_file} = undef;
|
||||||
|
|
||||||
|
# this updates buttons status
|
||||||
|
$self->object_list_changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub send_gcode {
|
sub send_gcode {
|
||||||
@ -1377,6 +1383,11 @@ sub object_list_changed {
|
|||||||
$self->{"btn_$_"}->$method
|
$self->{"btn_$_"}->$method
|
||||||
for grep $self->{"btn_$_"}, qw(reset arrange export_gcode export_stl send_gcode);
|
for grep $self->{"btn_$_"}, qw(reset arrange export_gcode export_stl send_gcode);
|
||||||
|
|
||||||
|
if ($self->{export_gcode_output_file} || $self->{send_gcode_file}) {
|
||||||
|
$self->{btn_export_gcode}->Disable;
|
||||||
|
$self->{btn_send_gcode}->Disable;
|
||||||
|
}
|
||||||
|
|
||||||
if ($self->{htoolbar}) {
|
if ($self->{htoolbar}) {
|
||||||
$self->{htoolbar}->EnableTool($_, $have_objects)
|
$self->{htoolbar}->EnableTool($_, $have_objects)
|
||||||
for (TB_RESET, TB_ARRANGE);
|
for (TB_RESET, TB_ARRANGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user