mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-14 04:31:49 +08:00
Fixed regression: projector window was not closed with the projector dialog
This commit is contained in:
parent
e79eac2671
commit
1532f54350
@ -2,7 +2,7 @@ package Slic3r::GUI::Projector;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Wx qw(:dialog :id :misc :sizer :systemsettings :bitmap :button :icon wxTheApp);
|
use Wx qw(:dialog :id :misc :sizer :systemsettings :bitmap :button :icon wxTheApp);
|
||||||
use Wx::Event qw(EVT_BUTTON EVT_TEXT_ENTER EVT_SPINCTRL EVT_SLIDER);
|
use Wx::Event qw(EVT_BUTTON EVT_CLOSE EVT_TEXT_ENTER EVT_SPINCTRL EVT_SLIDER);
|
||||||
use base qw(Wx::Dialog Class::Accessor);
|
use base qw(Wx::Dialog Class::Accessor);
|
||||||
use utf8;
|
use utf8;
|
||||||
|
|
||||||
@ -375,12 +375,16 @@ sub new {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# should be wxCLOSE but it crashes on Linux, maybe it's a Wx bug
|
||||||
my $buttons = $self->CreateStdDialogButtonSizer(wxOK);
|
my $buttons = $self->CreateStdDialogButtonSizer(wxOK);
|
||||||
EVT_BUTTON($self, wxID_CLOSE, sub {
|
EVT_BUTTON($self, wxID_OK, sub {
|
||||||
$self->_close;
|
$self->_close;
|
||||||
});
|
});
|
||||||
$sizer->Add($buttons, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 10);
|
$sizer->Add($buttons, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 10);
|
||||||
}
|
}
|
||||||
|
EVT_CLOSE($self, sub {
|
||||||
|
$self->_close;
|
||||||
|
});
|
||||||
|
|
||||||
$self->SetSizer($sizer);
|
$self->SetSizer($sizer);
|
||||||
$sizer->SetSizeHints($self);
|
$sizer->SetSizeHints($self);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user