Salome HOME
Erroneous cases in SALOME mode: Sketch, start sub-feature operation[some control...
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Part.cpp
index 6691f20faf5981a5fc70c44c30fc4c8901a92343..794fcd4fa2a58a459ac81a0cb302d1d87055721f 100644 (file)
@@ -72,7 +72,7 @@ int PartSetPlugin_Part::numberOfSubs(bool forTree) const
   return 0;
 }
 
-std::shared_ptr<ModelAPI_Feature> PartSetPlugin_Part::subFeature(const int theIndex, bool forTree) 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;
 }