# HG changeset patch # User Chris Cannam # Date 1570193822 -3600 # Node ID fd86f443678ac6aa1367f8f1e119a9c0f3d738b8 # Parent e50b2e568679a49425b673fa584a1334cafa35f2 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 diff -r e50b2e568679 -r fd86f443678a main/MainWindow.cpp --- 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)); diff -r e50b2e568679 -r fd86f443678a repoint-lock.json --- 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"