From: mpv Date: Wed, 21 Nov 2018 14:46:56 +0000 (+0300) Subject: Optimization of update of the data tree X-Git-Tag: End2018~155 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e5a7e0cd16995c4d985c1fcef349dd92dc933979;p=modules%2Fshaper.git Optimization of update of the data tree --- 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) {