From 4ed768a69e4462c72fad62fc843272cbf403c4ff Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 7 Sep 2015 16:19:22 +0300 Subject: [PATCH] Fix for re-creation of old presentation of sketch circle on change radius in viewer, then in property panel, then "apply". --- src/Model/Model_Update.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 4b4ac45a2..169cf2b7d 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -33,7 +33,7 @@ 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() { @@ -356,6 +356,9 @@ void Model_Update::updateFeature(FeaturePtr theFeature) #endif executeFeature(theFeature); } else { + #ifdef DEB_UPDATE + std::cout<<"Feature is not valid, erase results "<name()<eraseResults(); redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated } @@ -680,7 +683,14 @@ void Model_Update::IterationItem::next() 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; + } + } } } } -- 2.39.2