diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 5a29ab394..ce78eab8e 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1677,6 +1677,7 @@ sub update { $self->{canvas}->reload_scene if $self->{canvas}; $self->{canvas3D}->reload_scene if $self->{canvas3D}; + $self->{preview3D}->reset_gcode_preview_data if $self->{preview3D}; $self->{preview3D}->reload_print if $self->{preview3D}; } diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index bd49bedb6..4834f7aed 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -289,6 +289,12 @@ sub refresh_print { $self->load_print; } +sub reset_gcode_preview_data { + my ($self) = @_; + $self->gcode_preview_data->reset; + $self->canvas->reset_legend_texture(); +} + sub load_print { my ($self) = @_;