mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 04:52:01 +08:00
Fix for #12874 - Ctrl-P does not open preferences in 2.8.0-alpha5
This commit is contained in:
parent
1c0cb70faa
commit
7519142b1f
@ -2598,7 +2598,7 @@ void GUI_App::update_mode()
|
||||
plater()->canvas3D()->update_gizmos_on_off_state();
|
||||
}
|
||||
|
||||
wxMenu* GUI_App::get_config_menu()
|
||||
wxMenu* GUI_App::get_config_menu(MainFrame* main_frame)
|
||||
{
|
||||
auto local_menu = new wxMenu();
|
||||
wxWindowID config_id_base = wxWindow::NewControlId(int(ConfigMenuCnt));
|
||||
@ -2618,13 +2618,12 @@ wxMenu* GUI_App::get_config_menu()
|
||||
#endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
|
||||
local_menu->AppendSeparator();
|
||||
}
|
||||
local_menu->Append(config_id_base + ConfigMenuPreferences, _L("&Preferences") + dots +
|
||||
#ifdef __APPLE__
|
||||
"\tCtrl+,",
|
||||
local_menu->Append(config_id_base + ConfigMenuPreferences, _L("&Preferences") + dots + "\tCtrl+,", _L("Application preferences"));
|
||||
#else
|
||||
"\tCtrl+P",
|
||||
append_menu_item(local_menu, config_id_base + ConfigMenuPreferences, _L("&Preferences") + "\tCtrl+P", _L("Application preferences"),
|
||||
[](wxCommandEvent&) { wxGetApp().open_preferences(); }, "", nullptr, []() {return true; }, main_frame);
|
||||
#endif
|
||||
_L("Application preferences"));
|
||||
|
||||
local_menu->AppendSeparator();
|
||||
local_menu->Append(config_id_base + ConfigMenuLanguage, _L("&Language"));
|
||||
|
@ -293,7 +293,7 @@ public:
|
||||
bool save_mode(const /*ConfigOptionMode*/int mode) ;
|
||||
void update_mode();
|
||||
|
||||
wxMenu* get_config_menu();
|
||||
wxMenu* get_config_menu(MainFrame* main_frame);
|
||||
bool has_unsaved_preset_changes() const;
|
||||
bool has_current_preset_changes() const;
|
||||
void update_saved_preset_from_current_preset();
|
||||
|
@ -1636,7 +1636,7 @@ void MainFrame::init_menubar_as_editor()
|
||||
if (viewMenu)
|
||||
m_bar_menus.AppendMenuItem(viewMenu, _L("&View"));
|
||||
|
||||
m_bar_menus.AppendMenuItem(wxGetApp().get_config_menu(), _L("&Configuration"));
|
||||
m_bar_menus.AppendMenuItem(wxGetApp().get_config_menu(this), _L("&Configuration"));
|
||||
|
||||
m_bar_menus.AppendMenuSeparaorItem();
|
||||
|
||||
@ -1654,7 +1654,7 @@ void MainFrame::init_menubar_as_editor()
|
||||
m_menubar->Append(windowMenu, _L("&Window"));
|
||||
if (viewMenu) m_menubar->Append(viewMenu, _L("&View"));
|
||||
// Add additional menus from C++
|
||||
m_menubar->Append(wxGetApp().get_config_menu(), _L("&Configuration"));
|
||||
m_menubar->Append(wxGetApp().get_config_menu(this), _L("&Configuration"));
|
||||
m_menubar->Append(helpMenu, _L("&Help"));
|
||||
|
||||
SetMenuBar(m_menubar);
|
||||
@ -1747,7 +1747,7 @@ void MainFrame::init_menubar_as_gcodeviewer()
|
||||
m_menubar->Append(fileMenu, _L("&File"));
|
||||
if (viewMenu != nullptr) m_menubar->Append(viewMenu, _L("&View"));
|
||||
// Add additional menus from C++
|
||||
m_menubar->Append(wxGetApp().get_config_menu(), _L("&Configuration"));
|
||||
m_menubar->Append(wxGetApp().get_config_menu(this), _L("&Configuration"));
|
||||
m_menubar->Append(helpMenu, _L("&Help"));
|
||||
SetMenuBar(m_menubar);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user