Salome HOME
Issue #3047: Rollback modifications dedicated to property panel performance
[modules/shaper.git] / src / XGUI / XGUI_ContextMenuMgr.cpp
index a24747d5c4666845fc25f8315126c3e5f5fd2558..00cf24153ffbe8d7edd5e460e3d74bbe0ab5b0de 100644 (file)
@@ -347,6 +347,8 @@ void XGUI_ContextMenuMgr::updateObjectBrowserMenu()
         action("SHADING_CMD")->setEnabled(true);
         action("WIREFRAME_CMD")->setEnabled(true);
       }
+      if (hasFeature && myWorkshop->canMoveFeature())
+        action("MOVE_CMD")->setEnabled(true);
     } // end multi-selection
 
     // Check folder management commands state if only features are selected
@@ -506,6 +508,8 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
     ObjectPtr aObject;
     foreach(ModuleBase_ViewerPrsPtr aPrs, aPrsList) {
       aObject = aPrs->object();
+      if (!aObject.get())
+        continue;
       GeomShapePtr aShape = aPrs->shape();
       if (aObject->isDisplayed()) {
         isVisible = true;
@@ -765,7 +769,7 @@ void XGUI_ContextMenuMgr::addObjBrowserMenu(QMenu* theMenu) const
       aActions.append(action("ADD_OUT_FOLDER_BEFORE_CMD"));
       aActions.append(action("ADD_OUT_FOLDER_AFTER_CMD"));
       aActions.append(mySeparator3);
-      //aActions.append(action("MOVE_CMD"));
+      aActions.append(action("MOVE_CMD"));
       aActions.append(action("COLOR_CMD"));
       aActions.append(action("DEFLECTION_CMD"));
       aActions.append(action("TRANSPARENCY_CMD"));