From f650cbb0c57b32426e30c27004ef2a6f43dc3796 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Tue, 26 Feb 2008 13:47:49 +0000 Subject: [PATCH] Apply a patch from Allan Black allan.black@btconnect.com fixes an issue he saw with recycle pool. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6491 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/mediaedit/mediaedit.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bacula/src/qt-console/mediaedit/mediaedit.cpp b/bacula/src/qt-console/mediaedit/mediaedit.cpp index 22aaf090be..137b77e0a0 100644 --- a/bacula/src/qt-console/mediaedit/mediaedit.cpp +++ b/bacula/src/qt-console/mediaedit/mediaedit.cpp @@ -187,11 +187,9 @@ MediaEdit::MediaEdit(QTreeWidgetItem *parentWidget, QString &mediaId) index = recyclePoolCombo->findText(m_recyclePool, Qt::MatchExactly); if (index == -1) { recyclePoolCombo->insertItem(0, ""); - index = recyclePoolCombo->findText(m_recyclePool, Qt::MatchExactly); - } - if (index != -1) { - recyclePoolCombo->setCurrentIndex(index); + index = 0; } + recyclePoolCombo->setCurrentIndex(index); } else { QMessageBox::warning(this, tr("No Volume name"), tr("No Volume name given"), QMessageBox::Ok, QMessageBox::Ok); @@ -257,7 +255,7 @@ void MediaEdit::okButtonPushed() scmd += " enabled=yes"; docmd = true; } - if (m_recyclePool != recyclePoolCombo->currentText()) { + if (m_recyclePool != recyclePoolCombo->currentText() && recyclePoolCombo->currentText() != "") { scmd += " recyclepool=\"" + recyclePoolCombo->currentText() + "\""; docmd = true; } -- 2.39.5