changeset 604:fd86f443678a

Workaround for #1930 "Crash on Windows when opening session file after another file has been opened" - use reworked PaneStack API to enforce never creating property boxes
author Chris Cannam
date Fri, 04 Oct 2019 13:57:02 +0100
parents e50b2e568679
children b03b967c3d2e
files main/MainWindow.cpp repoint-lock.json
diffstat 2 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Tue Oct 01 11:32:03 2019 +0100
+++ b/main/MainWindow.cpp	Fri Oct 04 13:57:02 2019 +0100
@@ -96,7 +96,9 @@
 
 
 MainWindow::MainWindow(SoundOptions options, bool withSonification, bool withSpectrogram) :
-    MainWindowBase(options),
+    MainWindowBase(options,
+                   int(PaneStack::Option::NoPropertyStacks) |
+                   int(PaneStack::Option::NoPaneAccessories)),
     m_overview(0),
     m_mainMenusCreated(false),
     m_playbackMenu(0),
@@ -190,8 +192,6 @@
     // We have a pane stack: it comes with the territory. However, we
     // have a fixed and known number of panes in it -- it isn't
     // variable
-    m_paneStack->setLayoutStyle(PaneStack::NoPropertyStacks);
-    m_paneStack->setShowPaneAccessories(false);
     connect(m_paneStack, SIGNAL(doubleClickSelectInvoked(sv_frame_t)),
             this, SLOT(doubleClickSelectInvoked(sv_frame_t)));
     scroll->setWidget(m_paneStack);
@@ -1645,7 +1645,7 @@
     createDocument();
     m_document->setAutoAlignment(true);
 
-    Pane *pane = m_paneStack->addPane(true);
+    Pane *pane = m_paneStack->addPane();
     pane->setPlaybackFollow(PlaybackScrollPage);
 
     m_viewManager->setGlobalCentreFrame
@@ -3020,9 +3020,9 @@
 {
     auto model = getMainModel();
 
-    cerr << "MainWindow::analyseNewMainModel: main model is " << model << endl;
-
-    cerr << "(document is " << m_document << ", it says main model is " << m_document->getMainModel() << ")" << endl;
+    SVDEBUG << "MainWindow::analyseNewMainModel: main model is " << model << endl;
+
+    SVDEBUG << "(document is " << m_document << ", it says main model is " << m_document->getMainModel() << ")" << endl;
     
     if (!model) {
         cerr << "no main model!" << endl;
@@ -3039,8 +3039,9 @@
     Pane *selectionStrip = 0;
 
     if (pc < 2) {
-        pane = m_paneStack->addPane(true);
-        selectionStrip = m_paneStack->addPane(true);
+        SVDEBUG << "MainWindow::analyseNewMainModel: Adding pane and selection strip (ruler)" << endl;
+        pane = m_paneStack->addPane();
+        selectionStrip = m_paneStack->addPane();
         m_document->addLayerToView
             (selectionStrip,
              m_document->createMainModelLayer(LayerFactory::TimeRuler));
--- a/repoint-lock.json	Tue Oct 01 11:32:03 2019 +0100
+++ b/repoint-lock.json	Fri Oct 04 13:57:02 2019 +0100
@@ -7,10 +7,10 @@
       "pin": "13bd41bd8a17"
     },
     "svgui": {
-      "pin": "4fab699536f9"
+      "pin": "0f1601d870db"
     },
     "svapp": {
-      "pin": "3e930ea94db6"
+      "pin": "8e9702c0b9c7"
     },
     "checker": {
       "pin": "c8c17e51aab0"