From: Dirk H Bartley Date: Mon, 1 Jun 2009 02:04:50 +0000 (+0000) Subject: Setting actions up like this I think is better. No restore from job or time X-Git-Tag: Release-3.0.2~185 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ca88641eaabf84e83dbe3af742eb7db4d59bbbae;p=bacula%2Fbacula Setting actions up like this I think is better. No restore from job or time if more than one job selected. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8881 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/joblist/joblist.cpp b/bacula/src/qt-console/joblist/joblist.cpp index 6c77a9dc6a..babb3d4d63 100644 --- a/bacula/src/qt-console/joblist/joblist.cpp +++ b/bacula/src/qt-console/joblist/joblist.cpp @@ -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);