|
From: Tapio V. <aa...@us...> - 2011-02-08 08:19:38
|
Module: editor
Branch: master
Commit: dcaeb9df66f30c68090a831e5e18df77754bbb7d
Author: Tapio Vierros <tap...@gm...>
Date: Tue Feb 8 09:56:17 2011 +0200
Update NoteGraphWidth at beginning of analyzing, not end.
---
notegraphwidget.cc | 2 +-
pitchvis.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 6c02428..0e2f850 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -124,8 +124,8 @@ void NoteGraphWidget::timerEvent(QTimerEvent* event)
{
QMutexLocker locker(&m_pitch->mutex);
progress = m_pitch->getProgress();
- needUpdate = m_pitch->newDataAvailable();
duration = m_pitch->getDuration();
+ needUpdate = m_pitch->newDataAvailable() || duration != m_duration;
done = m_pitch->isFinished();
}
emit analyzeProgress(1000 * progress, 1000);
diff --git a/pitchvis.cc b/pitchvis.cc
index e485bee..1d9c40a 100644
--- a/pitchvis.cc
+++ b/pitchvis.cc
@@ -12,7 +12,7 @@
#include <QSettings>
PitchVis::PitchVis(QString const& filename, QWidget *parent)
- : QWidget(parent), QThread(), mutex(), fileName(filename), moreAvailable(), cancelled()
+ : QWidget(parent), QThread(), mutex(), fileName(filename), duration(), moreAvailable(), cancelled()
{
start(); // Launch the thread
}
|