From e5a7e0cd16995c4d985c1fcef349dd92dc933979 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 21 Nov 2018 17:46:56 +0300 Subject: [PATCH] Optimization of update of the data tree --- src/XGUI/XGUI_DataModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index 4e29b2723..fc6096e86 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -139,14 +139,14 @@ void XGUI_DataModel::processEvent(const std::shared_ptr& theMess rebuildDataTree(); } else { - QTreeNodesList aParents; + QSet aParents; foreach(ObjectPtr aObj, aCreated) { ModuleBase_ITreeNode* aNode = myRoot->subNode(aObj); if (aNode) { if (aNode->parent()) aNode = aNode->parent(); if (!aParents.contains(aNode)) - aParents.append(aNode); + aParents.insert(aNode); } } foreach(ModuleBase_ITreeNode* aNode, aParents) { -- 2.39.2