From d6f5d97409d21fc8abedf6e5c10ecb4c81b2b5f9 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Sun, 25 Mar 2007 22:15:23 +0000 Subject: [PATCH] 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 --- bacula/src/qt-console/medialist/medialist.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; } } -- 2.39.5