From: nds Date: Mon, 9 Oct 2017 11:27:46 +0000 (+0300) Subject: #2271 'Fatal error' during sketching X-Git-Tag: V_2.9.0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=05468628bd11c950d60061a2f8764fb64c94f613;p=modules%2Fshaper.git #2271 'Fatal error' during sketching open case_hdistance study, edit sketch. The conflicting constraints do not marked in black(conflicting) color. --- diff --git a/src/PartSet/PartSet_OverconstraintListener.cpp b/src/PartSet/PartSet_OverconstraintListener.cpp index ba20c82a0..ef25f1e9a 100755 --- a/src/PartSet/PartSet_OverconstraintListener.cpp +++ b/src/PartSet/PartSet_OverconstraintListener.cpp @@ -87,6 +87,9 @@ void PartSet_OverconstraintListener::getCustomColor(const ObjectPtr& theObject, if (!myIsActive) return; + FeaturePtr aFeature = ModelAPI_Feature::feature(theObject); + std::string aFeatureName = aFeature->data()->name(); + if (myConflictingObjects.find(theObject) != myConflictingObjects.end()) { theColor = Config_PropManager::color("Visualization", "sketch_overconstraint_color"); } @@ -107,8 +110,11 @@ void PartSet_OverconstraintListener::getCustomColor(const ObjectPtr& theObject, void PartSet_OverconstraintListener::processEvent( const std::shared_ptr& theMessage) { - if (!myIsActive) - return; + // #2271 open document: if sketch has confilcting elements, solver sends message with the elements + // by opening the document. Sketch is not active, but an internal container should be updated. + // So, we should not check whether the listener is active here + //if (!myIsActive) + // return; #ifdef DEBUG_FEATURE_OVERCONSTRAINT_LISTENER bool isRepaired = theMessage->eventID() == Events_Loop::eventByName(EVENT_SOLVER_REPAIRED);