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-7.0.0~4950 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f650cbb0c57b32426e30c27004ef2a6f43dc3796;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; }