mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-09 04:39:09 +08:00
Bugfix: crash when deleting objects from plater with toolpaths preview open. #2389
This commit is contained in:
parent
807d042d11
commit
2d243a39ff
@ -525,6 +525,9 @@ sub remove {
|
|||||||
|
|
||||||
$self->stop_background_process;
|
$self->stop_background_process;
|
||||||
|
|
||||||
|
# Prevent toolpaths preview from rendering while we modify the Print object
|
||||||
|
$self->{toolpaths2D}->enabled(0) if $self->{toolpaths2D};
|
||||||
|
|
||||||
# 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;
|
||||||
@ -547,6 +550,9 @@ sub reset {
|
|||||||
|
|
||||||
$self->stop_background_process;
|
$self->stop_background_process;
|
||||||
|
|
||||||
|
# Prevent toolpaths preview from rendering while we modify the Print object
|
||||||
|
$self->{toolpaths2D}->enabled(0) if $self->{toolpaths2D};
|
||||||
|
|
||||||
@{$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