From bc827ac421b8306592d0b2bf3091a04006518a29 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 21 Apr 2016 16:37:06 +0300 Subject: [PATCH] Fix problem of dataModel rebuild --- src/XGUI/XGUI_DataModel.cpp | 4 ++-- src/XGUI/XGUI_ObjectsBrowser.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)) { -- 2.39.2