]> git.sur5r.net Git - bacula/bacula/commitdiff
Another good patch from Allan Black
authorDirk H Bartley <dbartley@schupan.com>
Thu, 6 Mar 2008 01:13:45 +0000 (01:13 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Thu, 6 Mar 2008 01:13:45 +0000 (01:13 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6538 91ce42f0-d328-0410-95d8-f526ca767f89

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

index 137b77e0a07d8052ebc823184a9f52f4ab09bb9f..e2b7d542f7bff4491ee92abfc9f2ba184e87b0e0 100644 (file)
@@ -184,9 +184,9 @@ MediaEdit::MediaEdit(QTreeWidgetItem *parentWidget, QString &mediaId)
       else enabledCheck->setCheckState(Qt::Unchecked);
       /* default for recycle pool */
       recyclePoolCombo->addItems(m_console->pool_list);
+      recyclePoolCombo->insertItem(0, "*None*");
       index = recyclePoolCombo->findText(m_recyclePool, Qt::MatchExactly);
       if (index == -1) {
-         recyclePoolCombo->insertItem(0, "");
          index = 0;
       }
       recyclePoolCombo->setCurrentIndex(index);
@@ -255,8 +255,12 @@ void MediaEdit::okButtonPushed()
       scmd += " enabled=yes";
       docmd = true;
    }
-   if (m_recyclePool != recyclePoolCombo->currentText() && recyclePoolCombo->currentText() != "") {
-      scmd += " recyclepool=\"" + recyclePoolCombo->currentText() + "\"";
+   if (m_recyclePool != recyclePoolCombo->currentText()) {
+      scmd += " recyclepool=\"";
+      if (recyclePoolCombo->currentText() != "*None*") {
+         scmd += recyclePoolCombo->currentText();
+      }
+      scmd += "\"";
       docmd = true;
    }
    if (docmd) {