|
From: Tapio V. <aa...@us...> - 2011-02-22 10:10:10
|
Author: Tapio Vierros <tap...@gm...>
Date: Tue Feb 22 12:06:39 2011 +0200
Also use BusyDialog with opening non-plaintext lyrics.
---
busydialog.hh | 5 +----
notegraphwidget.cc | 2 ++
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/busydialog.hh b/busydialog.hh
index f5b8fd2..60ff038 100644
--- a/busydialog.hh
+++ b/busydialog.hh
@@ -22,10 +22,7 @@ public:
QApplication::processEvents();
count = (count + 1) % interval;
// Only show the dialog after certainamount of time
- if (timer.isValid() && timer.elapsed() > 1500) {
- open();
- timer.invalidate();
- }
+ if (isHidden() && timer.elapsed() > 1500) open();
}
protected:
void closeEvent(QCloseEvent* event) { event->ignore(); }
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index b8b1122..dcf85d0 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -88,12 +88,14 @@ void NoteGraphWidget::setLyrics(QString lyrics)
void NoteGraphWidget::setLyrics(const VocalTrack &track)
{
+ BusyDialog busy(this, 10);
doOperation(Operation("CLEAR"));
m_duration = std::max(m_duration, track.endTime + endMarginSeconds);
const Notes ¬es = track.notes;
for (Notes::const_iterator it = notes.begin(); it != notes.end(); ++it) {
if (it->type == Note::SLEEP) continue;
doOperation(opFromNote(*it, m_notes.size(), false));
+ busy();
}
finalizeNewLyrics();
|