mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Bugfix: zooming in empty layers preview (because of disabled background processing) crashed
This commit is contained in:
@@ -164,6 +164,8 @@ sub new {
|
|||||||
EVT_MOUSEWHEEL($self, sub {
|
EVT_MOUSEWHEEL($self, sub {
|
||||||
my ($self, $e) = @_;
|
my ($self, $e) = @_;
|
||||||
|
|
||||||
|
return if !$self->GetParent->enabled;
|
||||||
|
|
||||||
my $old_zoom = $self->_zoom;
|
my $old_zoom = $self->_zoom;
|
||||||
|
|
||||||
# Calculate the zoom delta and apply it to the current zoom factor
|
# Calculate the zoom delta and apply it to the current zoom factor
|
||||||
@@ -205,6 +207,8 @@ sub new {
|
|||||||
sub mouse_event {
|
sub mouse_event {
|
||||||
my ($self, $e) = @_;
|
my ($self, $e) = @_;
|
||||||
|
|
||||||
|
return if !$self->GetParent->enabled;
|
||||||
|
|
||||||
my $pos = Slic3r::Pointf->new($e->GetPositionXY);
|
my $pos = Slic3r::Pointf->new($e->GetPositionXY);
|
||||||
if ($e->Entering && &Wx::wxMSW) {
|
if ($e->Entering && &Wx::wxMSW) {
|
||||||
# wxMSW needs focus in order to catch mouse wheel events
|
# wxMSW needs focus in order to catch mouse wheel events
|
||||||
|
|||||||
Reference in New Issue
Block a user