From: vsv Date: Thu, 21 Apr 2016 13:37:06 +0000 (+0300) Subject: Fix problem of dataModel rebuild X-Git-Tag: V_2.3.0~150 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bc827ac421b8306592d0b2bf3091a04006518a29;p=modules%2Fshaper.git Fix problem of dataModel rebuild --- diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index 585f773b2..47c0af292 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -234,10 +234,10 @@ void XGUI_DataModel::processEvent(const std::shared_ptr& theMess QModelIndex aIndex = objectIndex(aObject); if (aIndex.isValid()) { emit dataChanged(aIndex, aIndex); - }/* else { + } else { rebuildDataTree(); break; - }*/ + } } else { rebuildDataTree(); break; diff --git a/src/XGUI/XGUI_ObjectsBrowser.cpp b/src/XGUI/XGUI_ObjectsBrowser.cpp index be2ff3db8..7d6410a49 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.cpp +++ b/src/XGUI/XGUI_ObjectsBrowser.cpp @@ -455,7 +455,7 @@ QModelIndexList XGUI_ObjectsBrowser::expandedItems(const QModelIndex& theParent) { QModelIndexList aIndexes; QModelIndex aIndex; - for (int i = 0; i < myDocModel->rowCount(); i++) { + for (int i = 0; i < myDocModel->rowCount(theParent); i++) { aIndex = myDocModel->index(i, 0, theParent); if (myDocModel->hasChildren(aIndex)) { if (myTreeView->isExpanded(aIndex)) {