comparison framework/MainWindowBase.cpp @ 501:c82cae9a9e74 3.0-integration

Merge from branch "tony-2.0-integration"
author Chris Cannam
date Wed, 14 Oct 2015 10:18:58 +0100
parents dcd2afbc1bb7 4f1d280903ad
children 0fe07a89fbbb
comparison
equal deleted inserted replaced
500:dcd2afbc1bb7 501:c82cae9a9e74
2659 if (m_recordTarget->isRecording() || m_playSource->isPlaying()) { 2659 if (m_recordTarget->isRecording() || m_playSource->isPlaying()) {
2660 stop(); 2660 stop();
2661 QAction *action = qobject_cast<QAction *>(sender()); 2661 QAction *action = qobject_cast<QAction *>(sender());
2662 if (action) action->setChecked(false); 2662 if (action) action->setChecked(false);
2663 } else { 2663 } else {
2664 if (m_audioIO) m_audioIO->resume();
2664 playbackFrameChanged(m_viewManager->getPlaybackFrame()); 2665 playbackFrameChanged(m_viewManager->getPlaybackFrame());
2665 m_playSource->play(m_viewManager->getPlaybackFrame()); 2666 m_playSource->play(m_viewManager->getPlaybackFrame());
2666 } 2667 }
2667 } 2668 }
2668 2669
2688 } 2689 }
2689 2690
2690 if (m_recordTarget->isRecording()) { 2691 if (m_recordTarget->isRecording()) {
2691 stop(); 2692 stop();
2692 return; 2693 return;
2694 }
2695
2696 QAction *action = qobject_cast<QAction *>(sender());
2697
2698 if (m_audioRecordMode == RecordReplaceSession) {
2699 if (!checkSaveModified()) {
2700 if (action) action->setChecked(false);
2701 return;
2702 }
2693 } 2703 }
2694 2704
2695 QAction *action = qobject_cast<QAction *>(sender()); 2705 QAction *action = qobject_cast<QAction *>(sender());
2696 2706
2697 if (m_audioRecordMode == RecordReplaceSession) { 2707 if (m_audioRecordMode == RecordReplaceSession) {
2798 } 2808 }
2799 2809
2800 updateMenuStates(); 2810 updateMenuStates();
2801 m_recentFiles.addFile(model->getLocation()); 2811 m_recentFiles.addFile(model->getLocation());
2802 currentPaneChanged(m_paneStack->getCurrentPane()); 2812 currentPaneChanged(m_paneStack->getCurrentPane());
2813
2814 emit audioFileLoaded();
2803 } 2815 }
2804 2816
2805 void 2817 void
2806 MainWindowBase::ffwd() 2818 MainWindowBase::ffwd()
2807 { 2819 {
3030 void 3042 void
3031 MainWindowBase::stop() 3043 MainWindowBase::stop()
3032 { 3044 {
3033 if (m_recordTarget->isRecording()) { 3045 if (m_recordTarget->isRecording()) {
3034 m_recordTarget->stopRecording(); 3046 m_recordTarget->stopRecording();
3035 emit audioFileLoaded();
3036 } 3047 }
3037 3048
3038 m_playSource->stop(); 3049 m_playSource->stop();
3039 3050
3051 if (m_audioIO) m_audioIO->suspend();
3052
3040 if (m_paneStack && m_paneStack->getCurrentPane()) { 3053 if (m_paneStack && m_paneStack->getCurrentPane()) {
3041 updateVisibleRangeDisplay(m_paneStack->getCurrentPane()); 3054 updateVisibleRangeDisplay(m_paneStack->getCurrentPane());
3042 } else { 3055 } else {
3043 m_myStatusMessage = ""; 3056 m_myStatusMessage = "";
3044 getStatusLabel()->setText(""); 3057 getStatusLabel()->setText("");