Part: add datum objects and commands to create them.
This commit is contained in:
@@ -37,6 +37,7 @@ void WorkbenchManipulator::modifyMenuBar([[maybe_unused]] Gui::MenuItem* menuBar
|
||||
void WorkbenchManipulator::modifyToolBars(Gui::ToolBarItem* toolBar)
|
||||
{
|
||||
addSelectionFilter(toolBar);
|
||||
addDatums(toolBar);
|
||||
}
|
||||
|
||||
void WorkbenchManipulator::modifyDockWindows([[maybe_unused]] Gui::DockWindowItems* dockWindow)
|
||||
@@ -71,3 +72,18 @@ void WorkbenchManipulator::addSelectionFilter(Gui::ToolBarItem* toolBar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WorkbenchManipulator::addDatums(Gui::ToolBarItem* toolBar)
|
||||
{
|
||||
if (auto view = toolBar->findItem("Structure")) {
|
||||
auto add = new Gui::ToolBarItem(); // NOLINT
|
||||
add->setCommand("Part_Datums");
|
||||
auto item = view->findItem("Std_Group");
|
||||
if (item) {
|
||||
view->insertItem(item, add);
|
||||
}
|
||||
else {
|
||||
view->appendItem(add);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user