Fix display of special menu items (wxID_ABOUT, wxID_EXIT) on OS X
This commit is contained in:
parent
3c66ea3134
commit
230d4377c9
@ -29,9 +29,6 @@ sub OnInit {
|
||||
|
||||
# menubar
|
||||
my $menubar = Wx::MenuBar->new;
|
||||
$frame->SetMenuBar($menubar);
|
||||
EVT_MENU($frame, wxID_EXIT, sub {$_[0]->Close(1)});
|
||||
EVT_MENU($frame, wxID_ABOUT, \&About);
|
||||
|
||||
# status bar
|
||||
$frame->{statusbar} = Slic3r::GUI::ProgressStatusBar->new($frame, -1);
|
||||
@ -55,6 +52,17 @@ sub OnInit {
|
||||
EVT_MENU($frame, 4, sub { $panel->do_slice(reslice => 1) });
|
||||
EVT_MENU($frame, 5, sub { $panel->do_slice(save_as => 1) });
|
||||
EVT_MENU($frame, 6, sub { $panel->do_slice(save_as => 1, export_svg => 1) });
|
||||
EVT_MENU($frame, wxID_EXIT, sub {$_[0]->Close(1)});
|
||||
|
||||
# Help menu
|
||||
my $helpMenu = Wx::Menu->new;
|
||||
$helpMenu->Append(wxID_ABOUT, "&About");
|
||||
$menubar->Append($helpMenu, "&Help");
|
||||
EVT_MENU($frame, wxID_ABOUT, \&About);
|
||||
|
||||
# Set the menubar after appending items, otherwise special items
|
||||
# will not be handled correctly
|
||||
$frame->SetMenuBar($menubar);
|
||||
|
||||
$box->SetSizeHints($frame);
|
||||
$frame->SetSizer($box);
|
||||
|
Loading…
Reference in New Issue
Block a user