mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 01:15:53 +08:00
Fixed a crash on "File->Exit".
To popup main menu use native wxPanel::PopupMenu() function Don't use wrap function Plater::PopupMenu(), because it's no need in this case
This commit is contained in:
parent
ed51fc24c9
commit
a087c42c40
@ -332,7 +332,9 @@ TopBarItemsCtrl::TopBarItemsCtrl(wxWindow *parent) :
|
|||||||
m_menu_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event) {
|
m_menu_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event) {
|
||||||
m_menu_btn->set_selected(true);
|
m_menu_btn->set_selected(true);
|
||||||
wxPoint pos = m_menu_btn->GetPosition();
|
wxPoint pos = m_menu_btn->GetPosition();
|
||||||
wxGetApp().plater()->PopupMenu(&m_main_menu, pos);
|
// !!! To popup main menu use native wxPanel::PopupMenu() function
|
||||||
|
// Don't use wrap function Plater::PopupMenu(), because it's no need in this case
|
||||||
|
wxGetApp().plater()->wxPanel::PopupMenu(&m_main_menu, pos);
|
||||||
});
|
});
|
||||||
m_main_menu.Bind(wxEVT_MENU_CLOSE, [this](wxMenuEvent&) { m_menu_btn->set_selected(false); });
|
m_main_menu.Bind(wxEVT_MENU_CLOSE, [this](wxMenuEvent&) { m_menu_btn->set_selected(false); });
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user