# HG changeset patch # User Chris Cannam # Date 1402652224 -3600 # Node ID 1f2a4ad79967cf85e976332a508d5161e386bd8d # Parent 2da91cceed643d914b4524c834990228d83eab8e Introduce a new canSaveAs which is active whenever there is a main model; avoid silently overwriting existing session file when saving to audio path diff -r 2da91cceed64 -r 1f2a4ad79967 framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Thu Jun 12 18:52:52 2014 +0100 +++ b/framework/MainWindowBase.cpp Fri Jun 13 10:37:04 2014 +0100 @@ -528,6 +528,7 @@ emit canClearSelection(haveSelection); emit canEditSelection(haveSelection && haveCurrentEditableLayer); emit canSave(m_sessionFile != "" && m_documentModified); + emit canSaveAs(haveMainModel); emit canSelectPreviousPane(havePrevPane); emit canSelectNextPane(haveNextPane); emit canSelectPreviousLayer(havePrevLayer); diff -r 2da91cceed64 -r 1f2a4ad79967 framework/MainWindowBase.h --- a/framework/MainWindowBase.h Thu Jun 12 18:52:52 2014 +0100 +++ b/framework/MainWindowBase.h Fri Jun 13 10:37:04 2014 +0100 @@ -156,6 +156,7 @@ void canSelectPreviousLayer(bool); void canSelectNextLayer(bool); void canSave(bool); + void canSaveAs(bool); void hideSplash(); void sessionLoaded(); void audioFileLoaded();