From: Dirk H Bartley Date: Fri, 1 Jun 2007 01:45:11 +0000 (+0000) Subject: Dont allow close of page with a child in the page selector. X-Git-Tag: Release-7.0.0~6188 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f94506bb5c41758fe523debbb60973c967f93194;p=bacula%2Fbacula Dont allow close of page with a child in the page selector. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4957 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 1a408d678b..cfa939c090 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -380,10 +380,9 @@ void MainWin::treeItemChanged(QTreeWidgetItem *currentitem, QTreeWidgetItem *pre nextPage->setContextMenuDockText(); treeWidget->addAction(actionToggleDock); - /* if this page is closeable, then add that action */ - if (nextPage->isCloseable()) { + /* if this page is closeable, and it has no childern, then add that action */ + if ((nextPage->isCloseable()) && (currentitem->child(0) == NULL)) treeWidget->addAction(actionClosePage); - } /* Add the actions to the Page Selectors tree widget that are part of the * current items list of desired actions regardless of whether on top of stack*/