]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply a patch from Allan Black allan.black@btconnect.com fixes an issue he saw with...
authorDirk H Bartley <dbartley@schupan.com>
Tue, 26 Feb 2008 13:47:49 +0000 (13:47 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Tue, 26 Feb 2008 13:47:49 +0000 (13:47 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6491 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/mediaedit/mediaedit.cpp

index 22aaf090bed1f607e08e2077cb7ea7736b9f2ce3..137b77e0a07d8052ebc823184a9f52f4ab09bb9f 100644 (file)
@@ -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;
    }