]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issues #210 #211 #214 Correct edit behavior restored
authorsbh <sergey.belash@opencascade.com>
Thu, 30 Oct 2014 15:37:52 +0000 (18:37 +0300)
committersbh <sergey.belash@opencascade.com>
Thu, 30 Oct 2014 15:37:52 +0000 (18:37 +0300)
src/PartSet/PartSet_Module.cpp

index 035444ba936e51e465f3133a1d3495e6ebed6b57..b304940d3f37a56d46ffac6dfca3b20abd5d7556 100644 (file)
@@ -312,16 +312,16 @@ void PartSet_Module::onRestartOperation(std::string theName, ObjectPtr theObject
     ModuleBase_ISelection* aSelection = workshop()->selection();
     // Initialise operation with preliminary selection
     aSketchOp->initSelection(aSelection, myWorkshop->viewer());
-  } //else if (aFeature) {
-    //anOperation->setFeature(aFeature);
+  } else if (aFeature) { // In case of edit operation: set the previously created feature to the operation
+    anOperation->setFeature(aFeature);
     ////Deactivate result of current feature in order to avoid its selection
-    //XGUI_Displayer* aDisplayer = xWorkshop()->displayer();
-    //std::list<ResultPtr> aResults = aFeature->results();
-    //std::list<ResultPtr>::const_iterator aIt;
-    //for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) {
-    //  aDisplayer->deactivate(*aIt);
-    //}
-  //}
+    XGUI_Displayer* aDisplayer = xWorkshop()->displayer();
+    std::list<ResultPtr> aResults = aFeature->results();
+    std::list<ResultPtr>::const_iterator aIt;
+    for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) {
+      aDisplayer->deactivate(*aIt);
+    }
+  }
   sendOperation(anOperation);
   xWorkshop()->actionsMgr()->updateCheckState();
 }