diff framework/MainWindowBase.cpp @ 502:bfe468c89d30 tony-2.0-integration

Merge from branch "3.0-integration"
author Chris Cannam
date Wed, 14 Oct 2015 10:19:24 +0100
parents c82cae9a9e74
children 0fe07a89fbbb
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Tue Oct 13 14:26:40 2015 +0100
+++ b/framework/MainWindowBase.cpp	Wed Oct 14 10:19:24 2015 +0100
@@ -2200,6 +2200,7 @@
             createCallbackIO(m_recordTarget, m_playSource);
         m_audioIO->suspend(); // start in suspended state
         m_playSource->setSystemPlaybackTarget(m_audioIO);
+        m_recordTarget->setSystemRecordSource(m_audioIO);
     } else {
         m_playTarget = breakfastquay::AudioFactory::
             createCallbackPlayTarget(m_playSource);
@@ -2701,8 +2702,16 @@
         }
     }
 
+    QAction *action = qobject_cast<QAction *>(sender());
+    
+    if (m_audioRecordMode == RecordReplaceSession) {
+        if (!checkSaveModified()) {
+            if (action) action->setChecked(false);
+            return;
+        }
+    }
+
     m_audioIO->resume();
-
     WritableWaveFileModel *model = m_recordTarget->startRecording();
     if (!model) {
         cerr << "ERROR: MainWindowBase::record: Recording failed" << endl;