]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_Tools.cpp
Salome HOME
Correction for case: Clean history should be disabled on features in diactivated...
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.cpp
index 250cff9ff5bbccb90ac0b7fc3f661d217c4e1933..56d7d2dbfa14dab00070f3d5ab25d20ba8e7a7af 100755 (executable)
@@ -304,12 +304,13 @@ TopAbs_ShapeEnum shapeType(const QString& theType)
   return TopAbs_SHAPE;
 }
 
-void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFeature, bool& hasParameter, bool& hasSubFeature)
+void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFeature,
+                  bool& hasParameter, bool& hasCompositeOwner)
 {
   hasResult = false;
   hasFeature = false;
   hasParameter = false;
-  hasSubFeature = false;
+  hasCompositeOwner = false;
   foreach(ObjectPtr aObj, theObjects) {
     FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
@@ -319,8 +320,8 @@ void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFe
     hasFeature |= (aFeature.get() != NULL);
     hasParameter |= (aConstruction.get() != NULL);
     if (hasFeature) 
-      hasSubFeature |= (ModelAPI_Tools::compositeOwner(aFeature) != NULL);
-    if (hasFeature && hasResult  && hasParameter && hasSubFeature)
+      hasCompositeOwner |= (ModelAPI_Tools::compositeOwner(aFeature) != NULL);
+    if (hasFeature && hasResult  && hasParameter && hasCompositeOwner)
       break;
   }
 }