]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2141 Sketch : horizontal constraint not applicated when I select a line
authornds <nds@opencascade.com>
Tue, 25 Apr 2017 12:03:46 +0000 (15:03 +0300)
committernds <nds@opencascade.com>
Tue, 25 Apr 2017 12:03:46 +0000 (15:03 +0300)
src/ModuleBase/ModuleBase_ModelWidget.cpp
src/ModuleBase/ModuleBase_Tools.cpp

index 10042d488110d7d6187be6958fd8d3ee765b9c95..f0be4ae9e58002dba8ddb0082c929506c0d2b1a0 100644 (file)
@@ -386,15 +386,7 @@ void ModuleBase_ModelWidget::updateObject(ObjectPtr theObject)
 #ifdef DEBUG_WIDGET_INSTANCE
     qDebug("ModuleBase_ModelWidget::updateObject");
 #endif
-    ModuleBase_Tools::blockUpdateViewer(true);
-    // Fix the problem of not previewed results of constraints applied. Flush Create/Delete
-    // (for the sketch result) to start processing of the sketch in the solver.
-    // TODO: these flushes should be moved in a separate method provided by Model
-    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
-    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
-    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_DELETED));
-
-    ModuleBase_Tools::blockUpdateViewer(false);
+    ModuleBase_Tools::flushUpdated(theObject);
     emit objectUpdated();
   }
 }
index cca2ba2c5eea6c1a9271abef9e5cb99404fe454a..53ee5334769371849e24d90a0e1a81ee7ed454e6 100755 (executable)
@@ -701,7 +701,12 @@ void flushUpdated(ObjectPtr theObject)
 {
   blockUpdateViewer(true);
 
+  // Fix the problem of not previewed results of constraints applied. Flush Create/Delete
+  // (for the sketch result) to start processing of the sketch in the solver.
+  // TODO: these flushes should be moved in a separate method provided by Model
+  Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+  Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_DELETED));
 
   blockUpdateViewer(false);
 }