From 7d7f1e91fea153951ceaaf33bf91a839d012f836 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 6 Sep 2018 18:00:43 +0300 Subject: [PATCH] Issue #2628: Update indexes of data tree --- src/PartSet/PartSet_TreeNodes.cpp | 2 +- src/XGUI/XGUI_DataModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PartSet/PartSet_TreeNodes.cpp b/src/PartSet/PartSet_TreeNodes.cpp index 587082705..aab74ef42 100644 --- a/src/PartSet/PartSet_TreeNodes.cpp +++ b/src/PartSet/PartSet_TreeNodes.cpp @@ -864,7 +864,7 @@ void PartSet_PartRootNode::update() // Remove extra sub-nodes int aIndex = -1; - int aId = 0; + int aId = aRows; while (aId < myChildren.size()) { ModuleBase_ITreeNode* aNode = myChildren.at(aId); if (aNode->object().get()) { diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index 4528e5595..509169cf0 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -151,7 +151,7 @@ void XGUI_DataModel::processEvent(const std::shared_ptr& theMess ModuleBase_ITreeNode* aNode = myRoot->findParent(aDoc, aGroup.c_str()); if (aNode) { aNode->update(); - updateSubTree(aNode); + rebuildDataTree(); } } } -- 2.39.2