mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Toolbar refactoring
1) toolbar items define 3 callback functions for setting the visibility, setting the enabling state and defining their action which are set while adding a new item to the toolbar 2) the toolbar takes care to update all its items visibility and enabled states through a new update method to be called by the parent idle event handler 3) the toolbar handles mouse events by calling its on_mouse method
This commit is contained in:
parent
f02f24c4b7
commit
5018089351
9 changed files with 968 additions and 5 deletions
|
@ -122,6 +122,9 @@ void View3D::mirror_selection(Axis axis)
|
|||
m_canvas->mirror_selection(axis);
|
||||
}
|
||||
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
#if !ENABLE_CANVAS_GUI_REFACTORING
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
void View3D::update_toolbar_items_visibility()
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
|
@ -133,6 +136,9 @@ void View3D::enable_toolbar_item(const std::string& name, bool enable)
|
|||
if (m_canvas != nullptr)
|
||||
m_canvas->enable_toolbar_item(name, enable);
|
||||
}
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
#endif // !ENABLE_CANVAS_GUI_REFACTORING
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
int View3D::check_volumes_outside_state() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue