Mercurial > hg > sonic-visualiser
comparison main/MainWindow.cpp @ 504:22ebffe22f16
Small changes to management of dialogs
author | Chris Cannam |
---|---|
date | Mon, 30 Jan 2012 17:22:14 +0000 |
parents | d09a396cde80 |
children | 26ebbe098bce |
comparison
equal
deleted
inserted
replaced
503:5762b0aab869 | 504:22ebffe22f16 |
---|---|
316 | 316 |
317 MainWindow::~MainWindow() | 317 MainWindow::~MainWindow() |
318 { | 318 { |
319 // SVDEBUG << "MainWindow::~MainWindow" << endl; | 319 // SVDEBUG << "MainWindow::~MainWindow" << endl; |
320 delete m_keyReference; | 320 delete m_keyReference; |
321 delete m_activityLog; | |
321 delete m_preferencesDialog; | 322 delete m_preferencesDialog; |
322 delete m_layerTreeDialog; | 323 delete m_layerTreeDialog; |
323 Profiles::getInstance()->dump(); | 324 Profiles::getInstance()->dump(); |
324 // SVDEBUG << "MainWindow::~MainWindow finishing" << endl; | 325 // SVDEBUG << "MainWindow::~MainWindow finishing" << endl; |
325 } | 326 } |
2760 | 2761 |
2761 m_overview->unregisterView(pane); | 2762 m_overview->unregisterView(pane); |
2762 m_paneStack->deletePane(pane); | 2763 m_paneStack->deletePane(pane); |
2763 } | 2764 } |
2764 | 2765 |
2766 delete m_layerTreeDialog.data(); | |
2767 delete m_preferencesDialog.data(); | |
2768 | |
2769 m_activityLog->hide(); | |
2770 m_keyReference->hide(); | |
2771 | |
2765 delete m_document; | 2772 delete m_document; |
2766 m_document = 0; | 2773 m_document = 0; |
2767 m_viewManager->clearSelections(); | 2774 m_viewManager->clearSelections(); |
2768 m_timeRulerLayer = 0; // document owned this | 2775 m_timeRulerLayer = 0; // document owned this |
2769 | 2776 |
3054 QSettings settings; | 3061 QSettings settings; |
3055 settings.beginGroup("MainWindow"); | 3062 settings.beginGroup("MainWindow"); |
3056 settings.setValue("size", size()); | 3063 settings.setValue("size", size()); |
3057 settings.setValue("position", pos()); | 3064 settings.setValue("position", pos()); |
3058 settings.endGroup(); | 3065 settings.endGroup(); |
3059 | |
3060 delete m_keyReference; | |
3061 m_keyReference = 0; | |
3062 | 3066 |
3063 if (m_preferencesDialog && | 3067 if (m_preferencesDialog && |
3064 m_preferencesDialog->isVisible()) { | 3068 m_preferencesDialog->isVisible()) { |
3065 closeSession(); // otherwise we'll have to wait for prefs changes | 3069 closeSession(); // otherwise we'll have to wait for prefs changes |
3066 m_preferencesDialog->applicationClosing(false); | 3070 m_preferencesDialog->applicationClosing(false); |