From: Dirk H Bartley Date: Tue, 26 Feb 2008 13:47:49 +0000 (+0000) Subject: Apply a patch from Allan Black allan.black@btconnect.com fixes an issue he saw with... X-Git-Tag: Release-3.0.0~1798 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1cb46bc96da14d1803a497c6587a270388abd5d2;p=bacula%2Fbacula 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 --- 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; }