Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2018-08-01 16:34:33 +0300
committerLukas Matena <lukasmatena@seznam.cz>2018-08-02 12:04:47 +0300
commit76838703502be55a6cb67d72bf4990619a013ad6 (patch)
tree945aa63a3159f19f225973c7f9457a37c0026983 /lib/Slic3r/GUI
parentd5f042b4b82d46592739e19bc20408622258458e (diff)
New perl callback to force reloading of 3d scene after Purging volumes are changed
After the changes in previous commit, the 3D scene must be reloaded after the wipe tower is invalidated. This can mostly be done on the C++ side, but reloading after Purging volumes are changed required this C++ -> Perl call
Diffstat (limited to 'lib/Slic3r/GUI')
-rw-r--r--lib/Slic3r/GUI/Plater.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm
index 719f98a48..3bfd57bb3 100644
--- a/lib/Slic3r/GUI/Plater.pm
+++ b/lib/Slic3r/GUI/Plater.pm
@@ -144,6 +144,11 @@ sub new {
my ($angle_z) = @_;
$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 {
@@ -202,6 +207,8 @@ 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);
# Initialize 2D preview canvas
$self->{canvas} = Slic3r::GUI::Plater::2D->new($self->{preview_notebook}, wxDefaultSize, $self->{objects}, $self->{model}, $self->{config});