Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / Model / Model_ResultPart.cpp
index cdafeb6d0e7ae59a9603ea6b3063d17a5e577a27..98319c4749f33fc524bba9e5ee00662d21a87043 100644 (file)
@@ -5,11 +5,11 @@
 #include <Model_ResultPart.h>
 #include <ModelAPI_Data.h>
 #include <ModelAPI_AttributeDocRef.h>
-#include <ModelAPI_PluginManager.h>
+#include <ModelAPI_Session.h>
 
 boost::shared_ptr<ModelAPI_Document> Model_ResultPart::partDoc()
 {
-  return data()->docRef("PartDocument")->value();
+  return data()->document("PartDocument")->value();
 }
 
 boost::shared_ptr<ModelAPI_Feature> Model_ResultPart::owner()
@@ -31,7 +31,7 @@ void Model_ResultPart::setData(boost::shared_ptr<ModelAPI_Data> theData)
 
 void Model_ResultPart::activate()
 {
-  boost::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->docRef(DOC_REF());
+  boost::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
   
   if (!aDocRef->value()) {  // create (or open) a document if it is not yet created
     boost::shared_ptr<ModelAPI_Document> aDoc = document()->subDocument(data()->name());
@@ -40,5 +40,5 @@ void Model_ResultPart::activate()
     }
   }
   if (aDocRef->value())
-    ModelAPI_PluginManager::get()->setCurrentDocument(aDocRef->value());
+    ModelAPI_Session::get()->setActiveDocument(aDocRef->value());
 }