mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-05 23:05:10 +08:00
Stop background process when removing objects from the plater
This commit is contained in:
parent
301771e275
commit
51cf78534c
@ -475,6 +475,8 @@ sub remove {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($obj_idx) = @_;
|
my ($obj_idx) = @_;
|
||||||
|
|
||||||
|
$self->stop_background_process;
|
||||||
|
|
||||||
# if no object index is supplied, remove the selected one
|
# if no object index is supplied, remove the selected one
|
||||||
if (!defined $obj_idx) {
|
if (!defined $obj_idx) {
|
||||||
($obj_idx, undef) = $self->selected_object;
|
($obj_idx, undef) = $self->selected_object;
|
||||||
@ -489,11 +491,15 @@ sub remove {
|
|||||||
$self->select_object(undef);
|
$self->select_object(undef);
|
||||||
$self->update;
|
$self->update;
|
||||||
$self->{canvas}->Refresh;
|
$self->{canvas}->Refresh;
|
||||||
|
|
||||||
|
$self->schedule_background_process;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub reset {
|
sub reset {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
|
$self->stop_background_process;
|
||||||
|
|
||||||
@{$self->{objects}} = ();
|
@{$self->{objects}} = ();
|
||||||
$self->{model}->clear_objects;
|
$self->{model}->clear_objects;
|
||||||
$self->{print}->clear_objects;
|
$self->{print}->clear_objects;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user