|
From: Tapio V. <aa...@us...> - 2011-01-18 10:34:21
|
Module: editor
Branch: master
Commit: f1f38ff678e1904ad59b95c9a39fa4931934a9c3
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 18 12:32:19 2011 +0200
Trim whitespace when loading US TXT lyrics.
---
notegraphwidget.cc | 2 +-
songparser-txt.cc | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 882c813..5f0c8f2 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -102,7 +102,7 @@ void NoteGraphWidget::setLyrics(const VocalTrack &track)
int diff = track.noteMax - track.noteMin;
m_octaves = std::ceil(diff / 12.0f) + 1;
m_lowestNote = clamp(track.noteMin - 6, 0, 1000);
- std::cout << "--: " << m_octaves << " " << m_lowestNote << std::endl;
+ //std::cout << "Octaves: " << m_octaves << " Lowest:" << m_lowestNote << std::endl;
setFixedSize(s2px(track.endTime), ndiff2px(m_octaves*12));
bool first = true;
diff --git a/songparser-txt.cc b/songparser-txt.cc
index 6854f2a..29b7ea4 100644
--- a/songparser-txt.cc
+++ b/songparser-txt.cc
@@ -95,6 +95,7 @@ bool SongParser::txtParseNote(std::string line, VocalTrack &vocal) {
n.notePrev = n.note; // No slide notes in TXT yet.
if (m_relative) ts += m_relativeShift;
if (iss.get() == ' ') std::getline(iss, n.syllable);
+ boost::trim(n.syllable);
n.end = tsTime(ts + length);
}
break;
|