Skip to content

Commit

Permalink
Part Design : Fix contextmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
PaddleStroke committed Jan 13, 2025
1 parent 5030112 commit 5eb0aeb
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions src/Mod/PartDesign/Gui/Workbench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,34 +129,16 @@ void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) con
}

if (Gui::Selection().countObjectsOfType(PartDesign::Transformed::getClassTypeId()) -
Gui::Selection().countObjectsOfType(PartDesign::MultiTransform::getClassTypeId()) == 1 )
Gui::Selection().countObjectsOfType(PartDesign::MultiTransform::getClassTypeId()) == 1) {
*item << "PartDesign_MultiTransform";

if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0) {
*item << "Std_Placement"
<< "Std_ToggleVisibility"
<< "Std_ShowSelection"
<< "Std_HideSelection"
<< "Std_ToggleSelectability"
<< "Std_TreeSelectAllInstances"
<< "Separator"
<< "Std_RandomColor"
<< "Std_ToggleTransparency"
<< "Std_Cut"
<< "Std_Copy"
<< "Std_Paste"
<< "Std_Delete"
<< "Std_SendToPythonConsole"
<< "Separator";
}
}
}

if (strcmp(recipient, "View") == 0) {
if (item->hasItems())
*item << "Separator";
Gui::StdWorkbench::setupContextMenu(recipient, item);
if (item->hasItems()) {
*item << "Separator";
}
Gui::StdWorkbench::setupContextMenu(recipient, item);
}

void Workbench::activated()
Expand Down

0 comments on commit 5eb0aeb

Please sign in to comment.