From: nds Date: Wed, 3 Jun 2015 14:06:24 +0000 (+0300) Subject: Bug #543: performance is bad when edit sketch X-Git-Tag: V_1.2.1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=26abea1bd42b77dd70f15ce324b45d086fa980ef;p=modules%2Fshaper.git Bug #543: performance is bad when edit sketch --- diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index e34df2950..cdd43b2bf 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -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 aMsg = std::shared_ptr( + 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( + new Events_Message(Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED))); + + Events_Loop::loop()->send(aMsg); } bool ModuleBase_Operation::commit() diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index bfdc7f104..d945b95e0 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -379,6 +379,7 @@ void XGUI_Workshop::processEvent(const std::shared_ptr& 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 anAppError = std::dynamic_pointer_cast(theMessage);