Salome HOME
Merge branch 'Dev_1.5.0' of salome:modules/shaper into Dev_1.5.0
authorVitaly SMETANNIKOV <vsv@opencascade.com>
Wed, 11 Nov 2015 13:31:41 +0000 (16:31 +0300)
committerVitaly SMETANNIKOV <vsv@opencascade.com>
Wed, 11 Nov 2015 13:31:41 +0000 (16:31 +0300)
src/Model/Model_Document.cpp
src/XGUI/XGUI_Tools.cpp
src/XGUI/XGUI_Tools.h

index f767f340ed5e330b7e1e358ca2251c1935d1622f..a5598b6a5d5cb28d6e7ce7b006e0447cf198a939 100755 (executable)
@@ -438,7 +438,7 @@ static bool isEmptyTransaction(const Handle(TDocStd_Document)& theDoc) {
   const TDF_AttributeDeltaList& anAttrs = aDelta->AttributeDeltas();
   for (TDF_ListIteratorOfAttributeDeltaList anAttr(anAttrs); anAttr.More(); anAttr.Next()) {
     Handle(TDF_AttributeDelta)& anADelta = anAttr.Value();
-    Handle(TDF_DeltaOnAddition)& anAddition = Handle(TDF_DeltaOnAddition)::DownCast(anADelta);
+    Handle(TDF_DeltaOnAddition) anAddition = Handle(TDF_DeltaOnAddition)::DownCast(anADelta);
     if (anAddition.IsNull()) { // if the attribute was added, transaction is not empty
       if (!anADelta->Label().IsNull() && !anADelta->Attribute().IsNull()) {
         Handle(TDF_Attribute) aCurrentAttr;
index cd7248f45e878c93cba110f38930608f7afe4b00..ab9ef819f618481662ef078c9f63979fd9326252 100644 (file)
@@ -155,20 +155,6 @@ void refsToFeatureInFeatureDocument(const ObjectPtr& theObject, std::set<Feature
   }
 }
 
-//**************************************************************
-bool XGUI_Tools::isSubOfComposite(const ObjectPtr& theObject)
-{
-  bool isSub = false;
-  std::set<FeaturePtr> aRefFeatures;
-  refsToFeatureInFeatureDocument(theObject, aRefFeatures);
-  std::set<FeaturePtr>::const_iterator anIt = aRefFeatures.begin(),
-                                       aLast = aRefFeatures.end();
-  for (; anIt != aLast && !isSub; anIt++) {
-    isSub = isSubOfComposite(theObject, *anIt);
-  }
-  return isSub;
-}
-
 //**************************************************************
 bool isSubOfComposite(const ObjectPtr& theObject, const FeaturePtr& theFeature)
 {
@@ -188,6 +174,20 @@ bool isSubOfComposite(const ObjectPtr& theObject, const FeaturePtr& theFeature)
   return isSub;
 }
 
+//**************************************************************
+bool isSubOfComposite(const ObjectPtr& theObject)
+{
+  bool isSub = false;
+  std::set<FeaturePtr> aRefFeatures;
+  refsToFeatureInFeatureDocument(theObject, aRefFeatures);
+  std::set<FeaturePtr>::const_iterator anIt = aRefFeatures.begin(),
+                                       aLast = aRefFeatures.end();
+  for (; anIt != aLast && !isSub; anIt++) {
+    isSub = isSubOfComposite(theObject, *anIt);
+  }
+  return isSub;
+}
+
 //**************************************************************
 void refsToFeatureInAllDocuments(const ObjectPtr& theSourceObject, const ObjectPtr& theObject,
                                  std::set<FeaturePtr>& theDirectRefFeatures, 
index 48ab0d57b892676cb315d481eacb94cd627efb9c..18f237a007db14c1e23fac85b218098086faa713 100644 (file)
@@ -108,7 +108,7 @@ void XGUI_EXPORT refsToFeatureInFeatureDocument(const ObjectPtr& theObject,
  \param theFeature a candidate to be a composite feature
  \return a boolean value
  */
-bool XGUI_EXPORT isSubOfComposite(const ObjectPtr& theObject, const FeaturePtr& theFeature);
+bool XGUI_EXPORT isSubOfComposite(const ObjectPtr& theObject);
 
 /*!
  Returns a container of references feature to the source object. The search happens in the object