# HG changeset patch # User Chris Cannam # Date 1483539684 0 # Node ID 4c1ab4f9e1165cff75bdcb77f0e3d108ee38ac38 # Parent 5369359351cb580d218c94476892617c14cf39ca Ah, there already was a mechanism for that (recordDurationChanged()). But in any case we are better off prompting the model to update I think. diff -r 5369359351cb -r 4c1ab4f9e116 framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Wed Jan 04 13:23:18 2017 +0000 +++ b/framework/MainWindowBase.cpp Wed Jan 04 14:21:24 2017 +0000 @@ -158,7 +158,6 @@ m_initialDarkBackground(false), m_defaultFfwdRwdStep(2, 0), m_audioRecordMode(RecordCreateAdditionalModel), - m_audioRecordUpdateTimer(this), m_statusLabel(0), m_iconsVisibleInMenus(true), m_menuShortcutMapper(0) @@ -231,17 +230,16 @@ this, SLOT(paneDropAccepted(Pane *, QString))); connect(m_paneStack, SIGNAL(paneDeleteButtonClicked(Pane *)), this, SLOT(paneDeleteButtonClicked(Pane *))); - - connect(&m_audioRecordUpdateTimer, SIGNAL(timeout()), - m_paneStack, SLOT(update())); m_playSource = new AudioCallbackPlaySource(m_viewManager, QApplication::applicationName()); if (m_soundOptions & WithAudioInput) { m_recordTarget = new AudioRecordTarget(m_viewManager, QApplication::applicationName()); - connect(m_recordTarget, SIGNAL(recordDurationChanged(sv_frame_t, sv_samplerate_t)), - this, SLOT(recordDurationChanged(sv_frame_t, sv_samplerate_t))); + connect(m_recordTarget, + SIGNAL(recordDurationChanged(sv_frame_t, sv_samplerate_t)), + this, + SLOT(recordDurationChanged(sv_frame_t, sv_samplerate_t))); } connect(m_playSource, SIGNAL(sampleRateMismatch(sv_samplerate_t, sv_samplerate_t, bool)), @@ -3018,8 +3016,6 @@ currentPaneChanged(m_paneStack->getCurrentPane()); emit audioFileLoaded(); - - m_audioRecordUpdateTimer.start(1000); } void @@ -3268,8 +3264,6 @@ m_myStatusMessage = ""; getStatusLabel()->setText(""); } - - m_audioRecordUpdateTimer.stop(); } MainWindowBase::AddPaneCommand::AddPaneCommand(MainWindowBase *mw) : diff -r 5369359351cb -r 4c1ab4f9e116 framework/MainWindowBase.h --- a/framework/MainWindowBase.h Wed Jan 04 13:23:18 2017 +0000 +++ b/framework/MainWindowBase.h Wed Jan 04 14:21:24 2017 +0000 @@ -22,7 +22,6 @@ #include #include #include -#include #include "base/Command.h" #include "view/ViewManager.h" @@ -389,7 +388,6 @@ RealTime m_defaultFfwdRwdStep; AudioRecordMode m_audioRecordMode; - QTimer m_audioRecordUpdateTimer; mutable QLabel *m_statusLabel; QLabel *getStatusLabel() const;