Mercurial > hg > svapp
changeset 493:b3568eca53ba 3.0-integration
Restore record button toggle state if user cancels file session save dialog after hitting record
author | Chris Cannam |
---|---|
date | Mon, 12 Oct 2015 13:24:12 +0100 |
parents | 111e976f9ed4 |
children | 0ce24bb965a8 |
files | framework/MainWindowBase.cpp |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Thu Sep 17 13:46:07 2015 +0100 +++ b/framework/MainWindowBase.cpp Mon Oct 12 13:24:12 2015 +0100 @@ -2688,8 +2688,13 @@ return; } + QAction *action = qobject_cast<QAction *>(sender()); + if (m_audioRecordMode == RecordReplaceSession) { - if (!checkSaveModified()) return; + if (!checkSaveModified()) { + if (action) action->setChecked(false); + return; + } } if (m_audioIO) m_audioIO->resume(); @@ -2698,13 +2703,13 @@ if (!model) { cerr << "ERROR: MainWindowBase::record: Recording failed" << endl; //!!! report + if (action) action->setChecked(false); return; } if (!model->isOK()) { m_recordTarget->stopRecording(); delete model; - //!!! ??? return; } @@ -2720,6 +2725,8 @@ if (templateName != "") { FileOpenStatus tplStatus = openSessionTemplate(templateName); if (tplStatus == FileOpenCancelled) { + m_recordTarget->stopRecording(); + PlayParameterRepository::getInstance()->removePlayable(model); return; } if (tplStatus != FileOpenFailed) {