From d406986db3c6274058fc12ab82a7fe577d532bcd Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Thu, 6 Mar 2008 01:13:45 +0000 Subject: [PATCH] Another good patch from Allan Black git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6538 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/mediaedit/mediaedit.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bacula/src/qt-console/mediaedit/mediaedit.cpp b/bacula/src/qt-console/mediaedit/mediaedit.cpp index 137b77e0a0..e2b7d542f7 100644 --- a/bacula/src/qt-console/mediaedit/mediaedit.cpp +++ b/bacula/src/qt-console/mediaedit/mediaedit.cpp @@ -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) { -- 2.39.5