From c65c9d876eb29e4660deea0a51dd6a2a2a047ab5 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 4 Jul 2015 15:25:11 +0200 Subject: [PATCH] Bugfix: zooming in empty layers preview (because of disabled background processing) crashed --- lib/Slic3r/GUI/Plater/2DToolpaths.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Slic3r/GUI/Plater/2DToolpaths.pm b/lib/Slic3r/GUI/Plater/2DToolpaths.pm index 7c1f487134..56912888d9 100644 --- a/lib/Slic3r/GUI/Plater/2DToolpaths.pm +++ b/lib/Slic3r/GUI/Plater/2DToolpaths.pm @@ -164,6 +164,8 @@ sub new { EVT_MOUSEWHEEL($self, sub { my ($self, $e) = @_; + return if !$self->GetParent->enabled; + my $old_zoom = $self->_zoom; # Calculate the zoom delta and apply it to the current zoom factor @@ -205,6 +207,8 @@ sub new { sub mouse_event { my ($self, $e) = @_; + return if !$self->GetParent->enabled; + my $pos = Slic3r::Pointf->new($e->GetPositionXY); if ($e->Entering && &Wx::wxMSW) { # wxMSW needs focus in order to catch mouse wheel events