mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 16:27:54 -06:00
ENABLE_GCODE_VIEWER_AS_STATE -> Fixed collapse toolbar showing-up when presing [T] in gcode preview mode
This commit is contained in:
parent
0348986bda
commit
39d08441cc
4 changed files with 13 additions and 15 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -230,24 +230,13 @@ void GLToolbar::set_icons_size(float size)
|
|||
|
||||
void GLToolbar::set_scale(float scale)
|
||||
{
|
||||
if (m_layout.scale != scale)
|
||||
{
|
||||
if (m_layout.scale != scale) {
|
||||
m_layout.scale = scale;
|
||||
m_layout.dirty = true;
|
||||
m_icons_texture_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool GLToolbar::is_enabled() const
|
||||
{
|
||||
return m_enabled;
|
||||
}
|
||||
|
||||
void GLToolbar::set_enabled(bool enable)
|
||||
{
|
||||
m_enabled = enable;//true; etFIXME
|
||||
}
|
||||
|
||||
bool GLToolbar::add_item(const GLToolbarItem::Data& data)
|
||||
{
|
||||
GLToolbarItem* item = new GLToolbarItem(GLToolbarItem::Action, data);
|
||||
|
|
|
@ -276,8 +276,8 @@ public:
|
|||
void set_icons_size(float size);
|
||||
void set_scale(float scale);
|
||||
|
||||
bool is_enabled() const;
|
||||
void set_enabled(bool enable);
|
||||
bool is_enabled() const { return m_enabled; }
|
||||
void set_enabled(bool enable) { m_enabled = enable; }
|
||||
|
||||
bool add_item(const GLToolbarItem::Data& data);
|
||||
bool add_separator();
|
||||
|
|
|
@ -279,9 +279,13 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
|
|||
|
||||
update_ui_from_settings(); // FIXME (?)
|
||||
|
||||
if (m_plater != nullptr)
|
||||
if (m_plater != nullptr) {
|
||||
#if ENABLE_GCODE_VIEWER_AS_STATE
|
||||
m_plater->get_collapse_toolbar().set_enabled(wxGetApp().app_config->get("show_collapse_button") == "1");
|
||||
#endif // ENABLE_GCODE_VIEWER_AS_STATE
|
||||
m_plater->show_action_buttons(true);
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_LAYOUT_NO_RESTART
|
||||
void MainFrame::update_layout()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue