]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #3010: Cannot remove a part
authormpv <mpv@opencascade.com>
Thu, 5 Sep 2019 09:55:18 +0000 (12:55 +0300)
committermpv <mpv@opencascade.com>
Thu, 5 Sep 2019 09:55:33 +0000 (12:55 +0300)
src/Model/Model_Objects.cpp

index 3bda8a66333862cb53e8039cf3ad58b36f0d2c0d..152aaaeb84ee27a8c4211c1c3d3618dae7221f50 100644 (file)
@@ -1848,6 +1848,10 @@ void Model_Objects::updateResults(FeaturePtr theFeature, std::set<FeaturePtr>& t
     }
   }
 
+  // it may be on undo
+  if (!theFeature->data() || !theFeature->data()->isValid() || theFeature->isDisabled())
+    return;
+
   // check the existing results and remove them if there is nothing on the label
   std::list<ResultPtr>::const_iterator aResIter = theFeature->results().cbegin();
   while(aResIter != theFeature->results().cend()) {
@@ -1864,9 +1868,6 @@ void Model_Objects::updateResults(FeaturePtr theFeature, std::set<FeaturePtr>& t
     }
     aResIter++;
   }
-  // it may be on undo
-  if (!theFeature->data() || !theFeature->data()->isValid() || theFeature->isDisabled())
-    return;
   // check that results are presented on all labels
   int aResSize = int(theFeature->results().size());
   TDF_ChildIterator aLabIter(resultLabel(theFeature->data(), 0).Father());