Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / XGUI / XGUI_ObjectsBrowser.cpp
index ff78af48c690c2d2d75583af8521b41975f03f12..b08ccc36e8fd56b2ca403aef51190fc6f529b660 100644 (file)
@@ -28,6 +28,7 @@
 #include <ModelAPI_Tools.h>
 
 #include <ModuleBase_Tools.h>
+#include <ModuleBase_ITreeNode.h>
 
 #include <XGUI_Workshop.h>
 
@@ -211,7 +212,7 @@ void XGUI_DataTree::processHistoryChange(const QModelIndex& theIndex)
     if ((theIndex.internalId() == 0) && (aDoc != aMgr->moduleDocument()))
       // Clicked folder under root but active document is another
       return;
-    if ((theIndex.internalId() != 0) && (aDoc.get() != theIndex.internalPointer()))
+    if ((theIndex.internalId() != 0) && (aDoc != aModel->document(theIndex)))
       // Cliced not on active document folder
       return;
 
@@ -524,6 +525,7 @@ QModelIndexList XGUI_ObjectsBrowser::expandedItems(const QModelIndex& theParent)
 //***************************************************
 void XGUI_ObjectsBrowser::rebuildDataTree()
 {
+  myDocModel->root()->update();
   myDocModel->rebuildDataTree();
   update();
 }