|
From: Tapio V. <aa...@us...> - 2011-01-12 13:35:14
|
Module: editor
Branch: master
Commit: 5f47789242791666e92bd4610328ea7f19d46db7
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 14:41:00 2011 +0200
Use some doubles to make big amounts of lyrics behave better.
---
notegraphwidget.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 0cec21b..6b392d6 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -138,9 +138,9 @@ void NoteGraphWidget::updateNotes()
} else {
// Calculate position and size
- int w = gap.width() / float(gap.notes.size()) * 0.9;
- int step = (gap.width() - w * gap.notes.size()) / float(gap.notes.size() + 1);
- int x = gap.begin + step;
+ double w = gap.width() / double(gap.notes.size()) * 0.9;
+ double step = (gap.width() - w * gap.notes.size()) / double(gap.notes.size() + 1);
+ double x = gap.begin + step;
for (NoteLabels::iterator it2 = gap.notes.begin(); it2 != gap.notes.end(); ++it2) {
(*it2)->move(x, (*it2)->y());
(*it2)->resize(w, (*it2)->height());
|