]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3022: Update list of Undo commands
authorvsv <vsv@opencascade.com>
Mon, 30 Sep 2019 12:14:05 +0000 (15:14 +0300)
committervsv <vsv@opencascade.com>
Mon, 30 Sep 2019 12:14:22 +0000 (15:14 +0300)
src/XGUI/XGUI_Workshop.cpp

index 2ab27551e988ed64acc8fcd6d30fe129697e788f..f46604782aa18fdb1594e4cfc9166ba3e018f748 100644 (file)
@@ -2043,10 +2043,6 @@ void XGUI_Workshop::moveObjects()
 
   SessionPtr aMgr = ModelAPI_Session::get();
 
-  QString anActionId = "MOVE_CMD";
-  QString aDescription = contextMenuMgr()->action(anActionId)->text();
-  aMgr->startOperation(aDescription.toStdString());
-
   QObjectPtrList anObjects = mySelector->selection()->selectedObjects();
   // It is necessary to clear selection in order to avoid selection changed event during
   // moving and negative consequences connected with processing of already moved items
@@ -2057,6 +2053,10 @@ void XGUI_Workshop::moveObjects()
   if (!XGUI_Tools::canRemoveOrRename(desktop(), aFeatures))
     return;
 
+  QString anActionId = "MOVE_CMD";
+  QString aDescription = contextMenuMgr()->action(anActionId)->text();
+  aMgr->startOperation(aDescription.toStdString());
+
   // Sort features by index in document
   std::list<FeaturePtr> aFList(aFeatures.begin(), aFeatures.end());
   aFList.sort(compareFeature);
@@ -2073,6 +2073,7 @@ void XGUI_Workshop::moveObjects()
     aCurrentFeature = anActiveDocument->currentFeature(true);
   }
   aMgr->finishOperation();
+  updateCommandStatus();
 }
 
 //**************************************************************