From: Dirk H Bartley Date: Sun, 25 Mar 2007 22:15:23 +0000 (+0000) Subject: dhb Fix of a logic error. Tree shows up correctly now. X-Git-Tag: Release-7.0.0~6706 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d6f5d97409d21fc8abedf6e5c10ecb4c81b2b5f9;p=bacula%2Fbacula dhb Fix of a logic error. Tree shows up correctly now. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4419 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/medialist/medialist.cpp b/bacula/src/qt-console/medialist/medialist.cpp index 9e783cb8a2..a4dddadd20 100644 --- a/bacula/src/qt-console/medialist/medialist.cpp +++ b/bacula/src/qt-console/medialist/medialist.cpp @@ -56,7 +56,7 @@ MediaList::MediaList(QStackedWidget *parent, Console *console, QTreeWidgetItem * m_headerlist = new QStringList(); m_popupmedia = new QString(""); m_poollist = new QStringList(); - m_cmd = new QString("select m.volumename, m.mediaid, m.mediatype, p.name from media m, pool p ORDER BY p.name"); + m_cmd = new QString("select p.name, m.volumename, m.mediaid, m.mediatype from media m, pool p ORDER BY p.name"); } MediaList::~MediaList() @@ -104,9 +104,10 @@ void MediaList::populateTree() pooltreeitem->setExpanded( true ); } mediatreeitem = new QTreeWidgetItem(pooltreeitem); - } - mediatreeitem->setData(recorditemcnter, Qt::UserRole, 2); - mediatreeitem->setText(recorditemcnter, trimmeditem.toUtf8().data()); + } else { + mediatreeitem->setData(recorditemcnter-1, Qt::UserRole, 2); + mediatreeitem->setText(recorditemcnter-1, trimmeditem.toUtf8().data()); + } recorditemcnter+=1; } }