PD: [skip ci] fixes #6762: Involute gear tool duplicated in the menu

This commit is contained in:
wmayer
2022-04-19 17:38:53 +02:00
parent c5bab68332
commit 36f859996c

View File

@@ -555,8 +555,17 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "PartDesign_Boolean"
<< "Separator"
<< "PartDesign_Migrate"
<< "PartDesign_Sprocket"
<< "PartDesign_InvoluteGear";
<< "PartDesign_Sprocket";
// For 0.13 a couple of python packages like numpy, matplotlib and others
// are not deployed with the installer on Windows. Thus, the WizardShaft is
// not deployed either hence the check for the existence of the command.
if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_InvoluteGear")) {
*part << "PartDesign_InvoluteGear";
}
if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_WizardShaft")) {
*part << "Separator" << "PartDesign_WizardShaft";
}
// use Part's measure features also for PartDesign
Gui::MenuItem* measure = new Gui::MenuItem;
@@ -581,16 +590,6 @@ Gui::MenuItem* Workbench::setupMenuBar() const
view->insertItem(appr, face);
}
// For 0.13 a couple of python packages like numpy, matplotlib and others
// are not deployed with the installer on Windows. Thus, the WizardShaft is
// not deployed either hence the check for the existence of the command.
if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_InvoluteGear")) {
*part << "PartDesign_InvoluteGear";
}
if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_WizardShaft")) {
*part << "Separator" << "PartDesign_WizardShaft";
}
// Replace the "Duplicate selection" menu item with a replacement that is compatible with Body
item = root->findItem("&Edit");
Gui::MenuItem* dup = item->findItem("Std_DuplicateSelection");