]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/NewGeom/NewGeom_Module.cpp
Salome HOME
Bug #846 Color modification in preferences is applyed to the visualized objects after...
[modules/shaper.git] / src / NewGeom / NewGeom_Module.cpp
index c2cc2b33440ba6da239cc87937871ab0211e8ef8..50ff8bc2cd41c60021b55ea6f1c0b78964875032 100644 (file)
@@ -608,6 +608,16 @@ void NewGeom_Module::preferencesChanged(const QString& theSection, const QString
   }
   aProp->setValue(aValue);
 
+  // redisplay objects visualized in the viewer
+  static Events_ID EVENT_DISP = Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY);
+  static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
+  QObjectPtrList aDisplayed = myWorkshop->displayer()->displayedObjects();
+  QObjectPtrList::const_iterator anIt = aDisplayed.begin(), aLast = aDisplayed.end();
+  for (; anIt != aLast; anIt++) {
+    aECreator->sendUpdated(*anIt, EVENT_DISP);
+  }
+  Events_Loop::loop()->flush(EVENT_DISP);
+
 }
 
 void NewGeom_Module::inspectSalomeModules()