From: bartleyd2 Date: Thu, 1 Oct 2009 02:20:51 +0000 (-0400) Subject: Cause the tree widget selected to keep up with the tab widget selected X-Git-Tag: Release-7.0.0~2611^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b72a51e32902014e2ea8d198195049ee1621f04c;p=bacula%2Fbacula Cause the tree widget selected to keep up with the tab widget selected --- diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 43b70d54d6..e9a3930426 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -686,6 +686,13 @@ void MainWin::stackItemChanged(int) Pages* page = (Pages*)tabWidget->currentWidget(); /* run the virtual function in case this class overrides it */ page->currentStackItem(); + if (!m_waitState) { + disconnect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int))); + disconnect(treeWidget, SIGNAL( currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *))); + treeWidget->setCurrentItem(getFromHash(page)); + connect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int))); + connect(treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *))); + } } /*