]> git.sur5r.net Git - bacula/bacula/commitdiff
Cause the tree widget selected to keep up with the tab widget selected
authorbartleyd2 <bartleyd2@chartermi.net>
Thu, 1 Oct 2009 02:20:51 +0000 (22:20 -0400)
committerbartleyd2 <bartleyd2@chartermi.net>
Thu, 1 Oct 2009 02:20:51 +0000 (22:20 -0400)
bacula/src/qt-console/mainwin.cpp

index 43b70d54d624f405e152a84c2507858f85cd0763..e9a3930426cccedd5121a90ac97c278de83a1886 100644 (file)
@@ -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 *)));
+   }
 }
 
 /*