Salome HOME
Erroneous cases in SALOME mode: Sketch, start sub-feature operation[some control...
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Part.cpp
index f8b348a37227979a7d1589b63007f994812b84e2..794fcd4fa2a58a459ac81a0cb302d1d87055721f 100644 (file)
@@ -61,7 +61,7 @@ std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Part::addFeature(std::string the
   return FeaturePtr();
 }
 
-int PartSetPlugin_Part::numberOfSubs() const
+int PartSetPlugin_Part::numberOfSubs(bool forTree) const
 {
   ResultPartPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
   if (aResult.get()) {
@@ -72,7 +72,7 @@ int PartSetPlugin_Part::numberOfSubs() const
   return 0;
 }
 
-std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Part::subFeature(const int theIndex) const
+std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Part::subFeature(const int theIndex, bool forTree)
 {
   ResultPartPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
   if (aResult.get()) {
@@ -101,7 +101,7 @@ bool PartSetPlugin_Part::isSub(ObjectPtr theObject) const
   ResultPartPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultPart>(firstResult());
   if (aResult.get()) {
     DocumentPtr aDoc = aResult->partDoc();
-    return document() == aDoc;
+    return theObject->document() == aDoc;
   }
   return false;
 }