]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix of selection synchronization
authorvsv <vitaly.smetannikov@opencascade.com>
Tue, 19 Apr 2016 15:24:57 +0000 (18:24 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Tue, 19 Apr 2016 15:24:57 +0000 (18:24 +0300)
src/XGUI/XGUI_ObjectsBrowser.cpp

index 8c25035f0ca960272ff00f5a96e29440b7a0d29e..9ff3f6e00a36ffb2759457165642c6e76e7b6401 100644 (file)
@@ -362,10 +362,6 @@ XGUI_ObjectsBrowser::XGUI_ObjectsBrowser(QWidget* theParent)
 
   myDocModel = new XGUI_DataModel(this);
 
-  QItemSelectionModel* aSelMod = myTreeView->selectionModel();
-  connect(aSelMod, SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
-          this, SLOT(onSelectionChanged(const QItemSelection&, const QItemSelection&)));
-
   connect(myTreeView, SIGNAL(contextMenuRequested(QContextMenuEvent*)), this,
           SLOT(onContextMenuRequested(QContextMenuEvent*)));
 }
@@ -382,6 +378,10 @@ void XGUI_ObjectsBrowser::setXMLReader(Config_DataModelReader* theReader)
 
   // It has to be done after setting of model
   myActiveDocLbl->setTreeView(myTreeView);
+
+  QItemSelectionModel* aSelMod = myTreeView->selectionModel();
+  connect(aSelMod, SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
+          this, SLOT(onSelectionChanged(const QItemSelection&, const QItemSelection&)));
 }
 
 //***************************************************