From: vsv Date: Tue, 19 Apr 2016 15:24:57 +0000 (+0300) Subject: Fix of selection synchronization X-Git-Tag: V_2.3.0~180 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=370d62084e06af3d6b83979095efa51de77e2b87;p=modules%2Fshaper.git Fix of selection synchronization --- diff --git a/src/XGUI/XGUI_ObjectsBrowser.cpp b/src/XGUI/XGUI_ObjectsBrowser.cpp index 8c25035f0..9ff3f6e00 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.cpp +++ b/src/XGUI/XGUI_ObjectsBrowser.cpp @@ -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&))); } //***************************************************