]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Bug #543: performance is bad when edit sketch
authornds <natalia.donis@opencascade.com>
Wed, 3 Jun 2015 14:06:24 +0000 (17:06 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 3 Jun 2015 14:06:24 +0000 (17:06 +0300)
src/ModuleBase/ModuleBase_Operation.cpp
src/XGUI/XGUI_Workshop.cpp

index e34df2950fba4f7d285c061db17a5ff03d1eed34..cdd43b2bf9521d4d1f72fd3b37081401b7078baf 100644 (file)
@@ -180,6 +180,12 @@ void ModuleBase_Operation::resume()
 
 void ModuleBase_Operation::abort()
 {
+  // the viewer update should be blocked in order to avoid the features blinking before they are
+  // hidden
+  std::shared_ptr<Events_Message> aMsg = std::shared_ptr<Events_Message>(
+      new Events_Message(Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED)));
+  Events_Loop::loop()->send(aMsg);
+
   if (myIsEditing) {
     SessionPtr aMgr = ModelAPI_Session::get();
     DocumentPtr aDoc = aMgr->activeDocument();
@@ -201,6 +207,12 @@ void ModuleBase_Operation::abort()
 
   ModelAPI_Session::get()->abortOperation();
   emit stopped();
+  // the viewer update should be unblocked in order to avoid the features blinking before they are
+  // hidden
+  aMsg = std::shared_ptr<Events_Message>(
+                new Events_Message(Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED)));
+
+  Events_Loop::loop()->send(aMsg);
 }
 
 bool ModuleBase_Operation::commit()
index bfdc7f104a97efc8c984ae8049f41248ee9c5f6a..d945b95e0bf603efa9e46d2f050064887a8fb68b 100644 (file)
@@ -379,6 +379,7 @@ void XGUI_Workshop::processEvent(const std::shared_ptr<Events_Message>& theMessa
   } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED)) {
     // the viewer's update context is unblocked, the viewer's update works
     myDisplayer->enableUpdateViewer(true);
+    myDisplayer->updateViewer();
   } else {
     //Show error dialog if error message received.
     std::shared_ptr<Events_Error> anAppError = std::dynamic_pointer_cast<Events_Error>(theMessage);