From a769aee8b3d29c58ea25f0fe7380634c89f84284 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 14 Feb 2022 16:48:09 +0100 Subject: [PATCH] Part: define Part_SectionCut as permanent menu item --- src/Mod/Part/Gui/AppPartGui.cpp | 2 ++ src/Mod/Part/Gui/Workbench.cpp | 5 ----- src/Mod/PartDesign/Gui/Workbench.cpp | 5 ----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index 1addb59b70..ea296ec2b5 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -230,6 +230,8 @@ PyMOD_INIT_FUNC(PartGui) // add resources and reloads the translators loadPartResource(); + Gui::Workbench::addPermanentMenuItem("Part_SectionCut", "Std_ToggleClipPlane"); + // register bitmaps // Gui::BitmapFactoryInst& rclBmpFactory = Gui::BitmapFactory(); // rclBmpFactory.addXPM("Part_Feature",(const char**) PartFeature_xpm); diff --git a/src/Mod/Part/Gui/Workbench.cpp b/src/Mod/Part/Gui/Workbench.cpp index 98e935a22a..02882e3e72 100644 --- a/src/Mod/Part/Gui/Workbench.cpp +++ b/src/Mod/Part/Gui/Workbench.cpp @@ -164,11 +164,6 @@ Gui::MenuItem* Workbench::setupMenuBar() const Gui::MenuItem* face = new Gui::MenuItem(); face->setCommand("Part_ColorPerFace"); view->insertItem(appr, face); - appr = view->findItem("Std_ToggleClipPlane"); - appr = view->afterItem(appr); - Gui::MenuItem* cut = new Gui::MenuItem(); - cut->setCommand("Part_SectionCut"); - view->insertItem(appr, cut); } return root; diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index 38baed78b5..04927fbc6b 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -588,11 +588,6 @@ Gui::MenuItem* Workbench::setupMenuBar() const Gui::MenuItem* face = new Gui::MenuItem(); face->setCommand("Part_ColorPerFace"); view->insertItem(appr, face); - appr = view->findItem("Std_ToggleClipPlane"); - appr = view->afterItem(appr); - Gui::MenuItem* cut = new Gui::MenuItem(); - cut->setCommand("Part_SectionCut"); - view->insertItem(appr, cut); } // For 0.13 a couple of python packages like numpy, matplotlib and others