Added a cancel button, and rewrote initial option code to reuse OptionGroup.

This commit is contained in:
Joseph Lenox 2016-11-26 23:03:51 -06:00 committed by bubnikv
parent 3109a9bc1f
commit a0548898f3
2 changed files with 64 additions and 58 deletions

View file

@ -7,7 +7,7 @@ use warnings;
use utf8;
use File::Basename qw(basename);
use Wx qw(:misc :sizer :treectrl :button wxTAB_TRAVERSAL wxSUNKEN_BORDER wxBITMAP_TYPE_PNG
use Wx qw(:misc :sizer :treectrl :button wxTAB_TRAVERSAL wxSUNKEN_BORDER wxBITMAP_TYPE_PNG wxID_CANCEL
wxTheApp);
use Wx::Event qw(EVT_BUTTON EVT_TREE_ITEM_COLLAPSING EVT_TREE_SEL_CHANGED);
use base 'Wx::Panel';
@ -337,7 +337,9 @@ sub on_btn_lambda {
my ($self, $is_modifier) = @_;
my $dlg = Slic3r::GUI::Plater::LambdaObjectDialog->new($self);
$dlg->ShowModal();
if ($dlg->ShowModal() == wxID_CANCEL) {
return;
}
my $params = $dlg->ObjectParameter;
my $name = "lambda-".$params->{"type"};