]> git.sur5r.net Git - bacula/bacula/commitdiff
Setting actions up like this I think is better. No restore from job or time
authorDirk H Bartley <dbartley@schupan.com>
Mon, 1 Jun 2009 02:04:50 +0000 (02:04 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Mon, 1 Jun 2009 02:04:50 +0000 (02:04 +0000)
if more than one job selected.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8881 91ce42f0-d328-0410-95d8-f526ca767f89

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

index 6c77a9dc6adb39cc9cf34b5a57b9b3571adf0437..babb3d4d63891fa3259a3aabe754fcf053c53922 100644 (file)
@@ -658,11 +658,13 @@ void JobList::selectionChanged()
       /* include restore from time and job action or not */
       jobitem = mp_tableWidget->item(row, m_typeIndex);
       QString type = jobitem->text();
-      mp_tableWidget->removeAction(actionRestoreFromJob);
-      mp_tableWidget->removeAction(actionRestoreFromTime);
-      if (type == tr("Backup")) {
-         mp_tableWidget->addAction(actionRestoreFromJob);
-         mp_tableWidget->addAction(actionRestoreFromTime);
+      if (m_selectedJobsCount == 1) {
+         mp_tableWidget->removeAction(actionRestoreFromJob);
+         mp_tableWidget->removeAction(actionRestoreFromTime);
+         if (type == tr("Backup")) {
+            mp_tableWidget->addAction(actionRestoreFromJob);
+            mp_tableWidget->addAction(actionRestoreFromTime);
+         }
       }
       /* include cancel action or not */
       jobitem = mp_tableWidget->item(row, m_statusIndex);