From: nds Date: Thu, 2 Apr 2015 14:34:10 +0000 (+0300) Subject: Avoid blinking on the Redo functionality X-Git-Tag: V_1.1.0~57^2~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad532551bce3a8a123b304d3ea4523dc09ce6490;p=modules%2Fshaper.git Avoid blinking on the Redo functionality --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 5a6992d57..027248cba 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -998,6 +998,12 @@ void XGUI_Workshop::onUndo(int theTimes) //****************************************************** void XGUI_Workshop::onRedo(int theTimes) { + // the viewer update should be blocked in order to avoid the features blinking. For the created + // feature a results are created, the flush of the created signal caused the viewer redisplay for + // each created result. After a redisplay signal is flushed. So, the viewer update is blocked until + // redo of all possible objects happens + bool isUpdateEnabled = myDisplayer->enableUpdateViewer(false); + objectBrowser()->treeView()->setCurrentIndex(QModelIndex()); SessionPtr aMgr = ModelAPI_Session::get(); if (aMgr->isOperation()) @@ -1006,6 +1012,10 @@ void XGUI_Workshop::onRedo(int theTimes) aMgr->redo(); } updateCommandStatus(); + + // unblock the viewer update functionality and make update on purpose + myDisplayer->enableUpdateViewer(isUpdateEnabled); + myDisplayer->updateViewer(); } //******************************************************