mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
User mode-aware toolbar items
This commit is contained in:
parent
2d3da7ef33
commit
81c621716b
8 changed files with 141 additions and 61 deletions
|
@ -4414,6 +4414,16 @@ void GLCanvas3D::update_volumes_colors_by_extruder()
|
|||
m_volumes.update_colors_by_extruder(m_config);
|
||||
}
|
||||
|
||||
#if ENABLE_MODE_AWARE_TOOLBAR_ITEMS
|
||||
void GLCanvas3D::update_toolbar_items_visibility()
|
||||
{
|
||||
ConfigOptionMode mode = wxGetApp().get_mode();
|
||||
m_toolbar.set_item_visible("more", mode != comSimple);
|
||||
m_toolbar.set_item_visible("fewer", mode != comSimple);
|
||||
m_dirty = true;
|
||||
}
|
||||
#endif // ENABLE_MODE_AWARE_TOOLBAR_ITEMS
|
||||
|
||||
// Returns a Rect object denoting size and position of the Reset button used by a gizmo.
|
||||
// Returns in either screen or viewport coords.
|
||||
#if !ENABLE_IMGUI
|
||||
|
@ -6166,6 +6176,10 @@ bool GLCanvas3D::_init_toolbar()
|
|||
|
||||
enable_toolbar_item("add", true);
|
||||
|
||||
#if ENABLE_MODE_AWARE_TOOLBAR_ITEMS
|
||||
update_toolbar_items_visibility();
|
||||
#endif // ENABLE_MODE_AWARE_TOOLBAR_ITEMS
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue