From: nds Date: Thu, 4 Jun 2015 05:02:40 +0000 (+0300) Subject: Do not update OCCT viewer until the current feature in the tree is set. X-Git-Tag: V_1.2.1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d87cf0f183f8e92d99a060fe5ef2a06f607a4e11;p=modules%2Fshaper.git Do not update OCCT viewer until the current feature in the tree is set. --- diff --git a/src/PartSet/PartSet_PartDataModel.cpp b/src/PartSet/PartSet_PartDataModel.cpp index d124d80fc..9265e983e 100644 --- a/src/PartSet/PartSet_PartDataModel.cpp +++ b/src/PartSet/PartSet_PartDataModel.cpp @@ -17,6 +17,9 @@ #include #include #include +#include + +#include #include #include @@ -574,6 +577,12 @@ int PartSet_PartDataModel::lastHistoryRow() const void PartSet_PartDataModel::setLastHistoryItem(const QModelIndex& theIndex) { + // 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); + SessionPtr aMgr = ModelAPI_Session::get(); DocumentPtr aDoc = partDocument(); std::string aOpName = tr("History change").toStdString(); @@ -587,6 +596,12 @@ void PartSet_PartDataModel::setLastHistoryItem(const QModelIndex& theIndex) aDoc->setCurrentFeature(FeaturePtr(), true); aMgr->finishOperation(); } + // 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); } QModelIndex PartSet_PartDataModel::lastHistoryItem() const