From 4150a5d2828f69cb474640506a878074366ac1ec Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 17 Apr 2019 15:29:34 +0300 Subject: [PATCH] Fix for the issue #2910 : Undo some changes in the middle of the history line makes all features invalid when loading hdf --- src/ConstructionPlugin/ConstructionPlugin_Axis.h | 3 --- src/ConstructionPlugin/ConstructionPlugin_Plane.h | 3 --- src/ConstructionPlugin/ConstructionPlugin_Point.h | 3 --- src/Model/Model_Update.cpp | 6 ++---- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/ConstructionPlugin/ConstructionPlugin_Axis.h b/src/ConstructionPlugin/ConstructionPlugin_Axis.h index 9685eebff..63381d1ac 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Axis.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Axis.h @@ -246,9 +246,6 @@ class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomP /// Request for initialization of data model of the feature: adding all attributes CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes(); - /// Construction result is allways recomuted on the fly - CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;} - /// Use plugin manager for features creation ConstructionPlugin_Axis(); diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.h b/src/ConstructionPlugin/ConstructionPlugin_Plane.h index b1e010609..ce66bb66f 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.h @@ -251,9 +251,6 @@ public: /// Request for initialization of data model of the feature: adding all attributes CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes(); - /// Construction result is always recomputed on the fly - CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;} - /// Use plugin manager for features creation ConstructionPlugin_Plane(); diff --git a/src/ConstructionPlugin/ConstructionPlugin_Point.h b/src/ConstructionPlugin/ConstructionPlugin_Point.h index 3ab79c2f3..439805742 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Point.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Point.h @@ -324,9 +324,6 @@ public: /// Request for initialization of data model of the feature: adding all attributes. CONSTRUCTIONPLUGIN_EXPORT virtual void initAttributes(); - /// Construction result is allways recomuted on the fly. - CONSTRUCTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;} - /// Use plugin manager for features creation ConstructionPlugin_Point(); diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index bfd0bc3fc..07f87c3ed 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -722,10 +722,8 @@ bool Model_Update::processFeature(FeaturePtr theFeature) if (myUpdateBlocked) { if (!theFeature->isStable()) { aDoExecute = true; - } else if (theFeature->results().size()) { // execute only not-results features - aDoExecute = !(theFeature->firstResult()->groupName() == ModelAPI_ResultBody::group() || - theFeature->firstResult()->groupName() == ModelAPI_ResultPart::group() || - theFeature->getKind() == "Sketch"); + } else if (theFeature->results().size()) { // execute only not persistent results features + aDoExecute = !theFeature->isPersistentResult(); } else { aDoExecute = aState != ModelAPI_StateInvalidArgument; } -- 2.39.2