mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Deregister the update callback on end of the application.
This fixes a crash on exit.
This commit is contained in:
parent
c13cd284e4
commit
ea163edc41
5 changed files with 9 additions and 20 deletions
|
@ -145,11 +145,6 @@ sub new {
|
|||
$self->rotate(rad2deg($angle_z), Z, 'absolute');
|
||||
};
|
||||
|
||||
# callback to call schedule_background_process
|
||||
my $on_request_update = sub {
|
||||
$self->schedule_background_process;
|
||||
};
|
||||
|
||||
# callback to update object's geometry info while using gizmos
|
||||
my $on_update_geometry_info = sub {
|
||||
my ($size_x, $size_y, $size_z, $scale_factor) = @_;
|
||||
|
@ -208,7 +203,7 @@ sub new {
|
|||
Slic3r::GUI::_3DScene::register_on_viewport_changed_callback($self->{canvas3D}, sub { Slic3r::GUI::_3DScene::set_viewport_from_scene($self->{preview3D}->canvas, $self->{canvas3D}); });
|
||||
}
|
||||
|
||||
Slic3r::_GUI::register_on_request_update_callback($on_request_update);
|
||||
Slic3r::GUI::register_on_request_update_callback(sub { $self->schedule_background_process; });
|
||||
|
||||
# # Initialize 2D preview canvas
|
||||
# $self->{canvas} = Slic3r::GUI::Plater::2D->new($self->{preview_notebook}, wxDefaultSize, $self->{objects}, $self->{model}, $self->{config});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue