changeset 504:22ebffe22f16

Small changes to management of dialogs
author Chris Cannam
date Mon, 30 Jan 2012 17:22:14 +0000
parents 5762b0aab869
children 066274002a4c
files main/MainWindow.cpp
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Mon Jan 30 16:58:54 2012 +0000
+++ b/main/MainWindow.cpp	Mon Jan 30 17:22:14 2012 +0000
@@ -318,6 +318,7 @@
 {
 //    SVDEBUG << "MainWindow::~MainWindow" << endl;
     delete m_keyReference;
+    delete m_activityLog;
     delete m_preferencesDialog;
     delete m_layerTreeDialog;
     Profiles::getInstance()->dump();
@@ -2762,6 +2763,12 @@
 	m_paneStack->deletePane(pane);
     }
 
+    delete m_layerTreeDialog.data();
+    delete m_preferencesDialog.data();
+
+    m_activityLog->hide();
+    m_keyReference->hide();
+
     delete m_document;
     m_document = 0;
     m_viewManager->clearSelections();
@@ -3057,9 +3064,6 @@
     settings.setValue("position", pos());
     settings.endGroup();
 
-    delete m_keyReference;
-    m_keyReference = 0;
-
     if (m_preferencesDialog &&
         m_preferencesDialog->isVisible()) {
         closeSession(); // otherwise we'll have to wait for prefs changes