mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 17:45:58 +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)
|
void MainFrame::show_tabs_menu(bool show)
|
||||||
{
|
{
|
||||||
|
if (!m_menubar)
|
||||||
|
return;
|
||||||
if (show)
|
if (show)
|
||||||
append_tab_menu_items_to_menubar(m_menubar, plater() ? plater()->printer_technology() : ptFFF, true);
|
append_tab_menu_items_to_menubar(m_menubar, plater() ? plater()->printer_technology() : ptFFF, true);
|
||||||
else
|
else
|
||||||
@ -2192,6 +2194,8 @@ void MainFrame::add_to_recent_projects(const wxString& filename)
|
|||||||
|
|
||||||
void MainFrame::technology_changed()
|
void MainFrame::technology_changed()
|
||||||
{
|
{
|
||||||
|
if (!m_menubar)
|
||||||
|
return;
|
||||||
// update menu titles
|
// update menu titles
|
||||||
PrinterTechnology pt = plater()->printer_technology();
|
PrinterTechnology pt = plater()->printer_technology();
|
||||||
if (int id = m_menubar->FindMenu(pt == ptFFF ? _L("Material Settings") : _L("Filament Settings")); id != wxNOT_FOUND)
|
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