]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Optimization of update of the data tree
authormpv <mpv@opencascade.com>
Wed, 21 Nov 2018 14:46:56 +0000 (17:46 +0300)
committermpv <mpv@opencascade.com>
Wed, 21 Nov 2018 14:46:56 +0000 (17:46 +0300)
src/XGUI/XGUI_DataModel.cpp

index 4e29b27236522f0440f651c240b62c9731afc5a6..fc6096e862140910fc8c58a3aeb3323c5c4b3d7c 100644 (file)
@@ -139,14 +139,14 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
       rebuildDataTree();
     }
     else {
-      QTreeNodesList aParents;
+      QSet<ModuleBase_ITreeNode*> 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) {