From 30a68fcc88cdc33112777ab8886d42159711f602 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Wed, 23 Jul 2008 02:50:02 +0000 Subject: [PATCH] I was unable to think of a more elegent solution to an issue of a popup coming up every time the media list window was first clicked. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7418 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/medialist/medialist.cpp | 4 ++++ bacula/src/qt-console/medialist/medialist.h | 1 + 2 files changed, 5 insertions(+) diff --git a/bacula/src/qt-console/medialist/medialist.cpp b/bacula/src/qt-console/medialist/medialist.cpp index 57e9683e49..7ce47962ea 100644 --- a/bacula/src/qt-console/medialist/medialist.cpp +++ b/bacula/src/qt-console/medialist/medialist.cpp @@ -76,6 +76,9 @@ MediaList::~MediaList() */ void MediaList::populateTree() { + if (m_populating) + return; + m_populating = true; QTreeWidgetItem *pooltreeitem; if (!m_console->preventInUseConnect()) @@ -218,6 +221,7 @@ void MediaList::populateTree() for(int cnter=0; cnterresizeColumnToContents(cnter); } + m_populating = false; } /* diff --git a/bacula/src/qt-console/medialist/medialist.h b/bacula/src/qt-console/medialist/medialist.h index f51f565e3b..2fec22fb76 100644 --- a/bacula/src/qt-console/medialist/medialist.h +++ b/bacula/src/qt-console/medialist/medialist.h @@ -69,6 +69,7 @@ private: QString m_currentVolumeName; QString m_currentVolumeId; bool m_populated; + bool m_populating; bool m_checkcurwidget; QTreeWidgetItem *m_topItem; }; -- 2.39.5