]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#2271 'Fatal error' during sketching
authornds <nds@opencascade.com>
Mon, 9 Oct 2017 11:27:46 +0000 (14:27 +0300)
committernds <nds@opencascade.com>
Mon, 9 Oct 2017 11:28:48 +0000 (14:28 +0300)
open case_hdistance study, edit sketch. The conflicting constraints do not marked in black(conflicting) color.

src/PartSet/PartSet_OverconstraintListener.cpp

index ba20c82a0ade8d488f8fbf56d69b72ae9ea257f4..ef25f1e9ab999154055fde5fcafa10f61a8a28fa 100755 (executable)
@@ -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<Events_Message>& 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);