Salome HOME
Fix for re-creation of old presentation of sketch circle on change radius in viewer...
authormpv <mpv@opencascade.com>
Mon, 7 Sep 2015 13:19:22 +0000 (16:19 +0300)
committermpv <mpv@opencascade.com>
Mon, 7 Sep 2015 13:19:22 +0000 (16:19 +0300)
src/Model/Model_Update.cpp

index 4b4ac45a22a937e84424f373e8627ff58795c573..169cf2b7d6bab36f64e8c3b2ee95a08c3a4e50b9 100644 (file)
@@ -33,7 +33,7 @@
 using namespace std;
 
 Model_Update MY_UPDATER_INSTANCE;  /// the only one instance initialized on load of the library
 using namespace std;
 
 Model_Update MY_UPDATER_INSTANCE;  /// the only one instance initialized on load of the library
-//#define DEB_UPDATE
+#define DEB_UPDATE
 
 Model_Update::Model_Update()
 {
 
 Model_Update::Model_Update()
 {
@@ -356,6 +356,9 @@ void Model_Update::updateFeature(FeaturePtr theFeature)
         #endif
         executeFeature(theFeature);
       } else {
         #endif
         executeFeature(theFeature);
       } else {
+        #ifdef DEB_UPDATE
+          std::cout<<"Feature is not valid, erase results "<<theFeature->name()<<std::endl;
+        #endif
         theFeature->eraseResults();
         redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated
       }
         theFeature->eraseResults();
         redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated
       }
@@ -680,7 +683,14 @@ void Model_Update::IterationItem::next()
           break;
       }
     } else if (mySub.get()) {
           break;
       }
     } else if (mySub.get()) {
-      mySub = myObjects->nextFeature(mySub);
+      while(mySub.get()) {
+        mySub = myObjects->nextFeature(mySub);
+        CompositeFeaturePtr anOwner = ModelAPI_Tools::compositeOwner(mySub);
+        // skip sub-objects, that are subs not only for this: sketch elements relatively to PartSet
+        if (!anOwner.get()) {
+          break;
+        }
+      }
     }
   }
 }
     }
   }
 }