From ca88641eaabf84e83dbe3af742eb7db4d59bbbae Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Mon, 1 Jun 2009 02:04:50 +0000 Subject: [PATCH] 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 --- bacula/src/qt-console/joblist/joblist.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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); -- 2.39.5