From f94506bb5c41758fe523debbb60973c967f93194 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Fri, 1 Jun 2007 01:45:11 +0000 Subject: [PATCH] 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 --- bacula/src/qt-console/mainwin.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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*/ -- 2.39.5