Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit 5eb0aeb

Browse files
committed
Part Design : Fix contextmenu
1 parent 5030112 commit 5eb0aeb

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

src/Mod/PartDesign/Gui/Workbench.cpp

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -129,34 +129,16 @@ void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) con
129129
}
130130

131131
if (Gui::Selection().countObjectsOfType(PartDesign::Transformed::getClassTypeId()) -
132-
Gui::Selection().countObjectsOfType(PartDesign::MultiTransform::getClassTypeId()) == 1 )
132+
Gui::Selection().countObjectsOfType(PartDesign::MultiTransform::getClassTypeId()) == 1) {
133133
*item << "PartDesign_MultiTransform";
134-
135-
if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0) {
136-
*item << "Std_Placement"
137-
<< "Std_ToggleVisibility"
138-
<< "Std_ShowSelection"
139-
<< "Std_HideSelection"
140-
<< "Std_ToggleSelectability"
141-
<< "Std_TreeSelectAllInstances"
142-
<< "Separator"
143-
<< "Std_RandomColor"
144-
<< "Std_ToggleTransparency"
145-
<< "Std_Cut"
146-
<< "Std_Copy"
147-
<< "Std_Paste"
148-
<< "Std_Delete"
149-
<< "Std_SendToPythonConsole"
150-
<< "Separator";
151134
}
152135
}
153136
}
154137

155-
if (strcmp(recipient, "View") == 0) {
156-
if (item->hasItems())
157-
*item << "Separator";
158-
Gui::StdWorkbench::setupContextMenu(recipient, item);
138+
if (item->hasItems()) {
139+
*item << "Separator";
159140
}
141+
Gui::StdWorkbench::setupContextMenu(recipient, item);
160142
}
161143

162144
void Workbench::activated()

0 commit comments

Comments
 (0)