From 557b60a603a6ff1dd27923317a8420f627fed103 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Sat, 17 May 2008 13:55:06 +0000 Subject: [PATCH] This is Riccardo's job selection patch. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6980 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/joblist/joblist.cpp | 8 +++++--- bacula/src/qt-console/joblist/joblist.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bacula/src/qt-console/joblist/joblist.cpp b/bacula/src/qt-console/joblist/joblist.cpp index 2f7f5f5d6f..080012d913 100644 --- a/bacula/src/qt-console/joblist/joblist.cpp +++ b/bacula/src/qt-console/joblist/joblist.cpp @@ -138,7 +138,6 @@ void JobList::populateTable() mp_tableWidget->setColumnCount(headerlist.size()); mp_tableWidget->setHorizontalHeaderLabels(headerlist); mp_tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); - mp_tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); if (mainWin->m_sqlDebug) { Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data()); @@ -157,7 +156,7 @@ void JobList::populateTable() foreach (resultline, results) { fieldlist = resultline.split("\t"); if (fieldlist.size() < 12) - continue; // some fields missing, ignore row + continue; /* some fields missing, ignore row */ TableItemFormatter jobitem(*mp_tableWidget, row); @@ -397,7 +396,6 @@ void JobList::tableItemChanged(QTableWidgetItem *currentItem, QTableWidgetItem * int row = currentItem->row(); QTableWidgetItem* jobitem = mp_tableWidget->item(row, 0); m_currentJob = jobitem->text(); - selectedJobsGet(); /* include purged action or not */ jobitem = mp_tableWidget->item(row, m_purgedIndex); @@ -446,6 +444,10 @@ void JobList::createConnections() currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)), this, SLOT(tableItemChanged(QTableWidgetItem *, QTableWidgetItem *))); + /* for the tableItemChanged to maintain a delete selection */ + connect(mp_tableWidget, SIGNAL( itemSelectionChanged()), + this, SLOT(selectedJobsGet()) ); + /* Do what is required for the local context sensitive menu */ diff --git a/bacula/src/qt-console/joblist/joblist.h b/bacula/src/qt-console/joblist/joblist.h index 18eaabeddf..ca73b88c11 100644 --- a/bacula/src/qt-console/joblist/joblist.h +++ b/bacula/src/qt-console/joblist/joblist.h @@ -54,6 +54,7 @@ public slots: void populateTable(); virtual void treeWidgetName(QString &); void tableItemChanged(QTableWidgetItem *, QTableWidgetItem *); + void selectedJobsGet(); private slots: void consoleListJobid(); @@ -77,7 +78,6 @@ private: void readSettings(); void prepareFilterWidgets(); void fillQueryString(QString &query); - void selectedJobsGet(); QSplitter *m_splitter; QString m_groupText; QString m_splitText; -- 2.39.5