]> git.sur5r.net Git - bacula/bacula/commitdiff
This is Riccardo's job selection patch.
authorDirk H Bartley <dbartley@schupan.com>
Sat, 17 May 2008 13:55:06 +0000 (13:55 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Sat, 17 May 2008 13:55:06 +0000 (13:55 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6980 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/joblist/joblist.h

index 2f7f5f5d6fc3e8afbbd338236f5fc26a94f38195..080012d913cbfb1676163c8f6399f50315b8d720 100644 (file)
@@ -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 */
 
 
index 18eaabeddf6c775213d7e4b6b69895703c028437..ca73b88c11cb66114aec4c30f78a6af702ca158d 100644 (file)
@@ -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;