]> git.sur5r.net Git - bacula/bacula/commitdiff
Dont allow close of page with a child in the page selector.
authorDirk H Bartley <dbartley@schupan.com>
Fri, 1 Jun 2007 01:45:11 +0000 (01:45 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Fri, 1 Jun 2007 01:45:11 +0000 (01:45 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4957 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/mainwin.cpp

index 1a408d678b5e89dcb383478fd745cedfbb307014..cfa939c09007e37cb314c0d606198ea914da74db 100644 (file)
@@ -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*/