mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 20:15:59 +08:00
GCodeViewer: Fixed crash on start and switch of color mode
(SPE-2340)
This commit is contained in:
parent
357264272d
commit
4cddd3ea85
@ -2479,6 +2479,9 @@ bool GUI_App::save_mode(const /*ConfigOptionMode*/int mode)
|
|||||||
// Update view mode according to selected menu
|
// Update view mode according to selected menu
|
||||||
void GUI_App::update_mode()
|
void GUI_App::update_mode()
|
||||||
{
|
{
|
||||||
|
if (is_gcode_viewer())
|
||||||
|
return;
|
||||||
|
|
||||||
sidebar().update_mode();
|
sidebar().update_mode();
|
||||||
|
|
||||||
mainframe->m_tmp_top_bar->UpdateMode();
|
mainframe->m_tmp_top_bar->UpdateMode();
|
||||||
|
@ -1092,6 +1092,12 @@ void MainFrame::on_sys_color_changed()
|
|||||||
|
|
||||||
// update label colors in respect to the system mode
|
// update label colors in respect to the system mode
|
||||||
wxGetApp().init_ui_colours();
|
wxGetApp().init_ui_colours();
|
||||||
|
|
||||||
|
if (wxGetApp().is_gcode_viewer()) {
|
||||||
|
MenuFactory::sys_color_changed(m_menubar);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// but if there are some ui colors in appconfig, they have to be applied
|
// but if there are some ui colors in appconfig, they have to be applied
|
||||||
wxGetApp().update_ui_colours_from_appconfig();
|
wxGetApp().update_ui_colours_from_appconfig();
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user