Salome HOME
According to this branch modifications, sub-composites can be in history.
[modules/shaper.git] / src / Model / Model_Document.cpp
index c049e739b017a0752bfddd4c134246cec56f6d5d..28fda6f314c0c20abf921d4d4e7619ca0afb94c1 100644 (file)
@@ -739,8 +739,7 @@ std::shared_ptr<ModelAPI_Feature> Model_Document::currentFeature(const bool theV
     TDF_Label aLab = aRef->Get();
     FeaturePtr aResult = myObjs->feature(aLab);
     if (theVisible) { // get nearest visible (in history) going up
-      while(aResult.get() &&  // sub-composites are never in history
-             (!aResult->isInHistory() || ModelAPI_Tools::compositeOwner(aResult).get())) {
+      while(aResult.get() &&  !aResult->isInHistory()) {
         aResult = myObjs->nextFeature(aResult, true);
       }
     }