ENABLE_GCODE_VIEWER_AS_STATE -> Fixed collapse toolbar showing-up when presing [T] in gcode preview mode

This commit is contained in:
enricoturri1966 2020-07-29 15:40:28 +02:00
parent 0348986bda
commit 39d08441cc
4 changed files with 13 additions and 15 deletions

View file

@ -4295,8 +4295,13 @@ void GLCanvas3D::update_ui_from_settings()
}
#endif // ENABLE_RETINA_GL
#if ENABLE_GCODE_VIEWER_AS_STATE
if (wxGetApp().mainframe != nullptr && wxGetApp().mainframe->get_mode() != MainFrame::EMode::GCodeViewer)
wxGetApp().plater()->get_collapse_toolbar().set_enabled(wxGetApp().app_config->get("show_collapse_button") == "1");
#else
bool enable_collapse = wxGetApp().app_config->get("show_collapse_button") == "1";
wxGetApp().plater()->get_collapse_toolbar().set_enabled(enable_collapse);
#endif // ENABLE_GCODE_VIEWER_AS_STATE
}