From 370d62084e06af3d6b83979095efa51de77e2b87 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 19 Apr 2016 18:24:57 +0300 Subject: [PATCH] Fix of selection synchronization --- src/XGUI/XGUI_ObjectsBrowser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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&))); } //*************************************************** -- 2.39.2