Salome HOME
Make undo/redo working correctly with the color of results
[modules/shaper.git] / src / ModuleBase / ModuleBase_Operation.cpp
index 6119c42c80fd91df36bb17afca727d12cfeb861f..4b8c7d34bec1db0259ad11036dc3dffed806e207 100644 (file)
@@ -85,7 +85,7 @@ FeaturePtr ModuleBase_Operation::createFeature(const bool theFlushMessage)
   if (myParentFeature.get()) {
     myFeature = myParentFeature->addFeature(getDescription()->operationId().toStdString());
   } else {
-    std::shared_ptr<ModelAPI_Document> aDoc = document();
+    std::shared_ptr<ModelAPI_Document> aDoc = ModelAPI_Session::get()->activeDocument();
     myFeature = aDoc->addFeature(getDescription()->operationId().toStdString());
   }
   if (myFeature) {  // TODO: generate an error if feature was not created
@@ -127,13 +127,6 @@ bool ModuleBase_Operation::hasObject(ObjectPtr theObj) const
   return false;
 }
 
-
-std::shared_ptr<ModelAPI_Document> ModuleBase_Operation::document() const
-{
-  return ModelAPI_Session::get()->moduleDocument();
-}
-
-
 void ModuleBase_Operation::start()
 {
   QString anId = getDescription()->operationId();