mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 00:56:00 +08:00
TopBar: Fixed a crash on switch print technology
This commit is contained in:
parent
83ce1d600a
commit
f05318686c
@ -383,6 +383,8 @@ static void add_tabs_as_menu(wxMenuBar* bar, MainFrame* main_frame, wxWindow* ba
|
||||
|
||||
void MainFrame::show_tabs_menu(bool show)
|
||||
{
|
||||
if (!m_menubar)
|
||||
return;
|
||||
if (show)
|
||||
append_tab_menu_items_to_menubar(m_menubar, plater() ? plater()->printer_technology() : ptFFF, true);
|
||||
else
|
||||
@ -2192,6 +2194,8 @@ void MainFrame::add_to_recent_projects(const wxString& filename)
|
||||
|
||||
void MainFrame::technology_changed()
|
||||
{
|
||||
if (!m_menubar)
|
||||
return;
|
||||
// update menu titles
|
||||
PrinterTechnology pt = plater()->printer_technology();
|
||||
if (int id = m_menubar->FindMenu(pt == ptFFF ? _L("Material Settings") : _L("Filament Settings")); id != wxNOT_FOUND)
|
||||
|
Loading…
x
Reference in New Issue
Block a user