Skip to content

Commit

Permalink
Enable alignment of verse numbers, patch from mattmcclinch
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Apr 13, 2018
1 parent 82699c7 commit 6650189
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libmscore/lyrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,23 +294,21 @@ void Lyrics::layout1()
QRegularExpression punctuationPattern("(^[\\d\\W]*)([^\\d\\W].*?)([\\d\\W]*$)", QRegularExpression::UseUnicodePropertiesOption);
QRegularExpressionMatch punctuationMatch = punctuationPattern.match(s);
if (punctuationMatch.hasMatch()) {
#if 0 // TODO::ws
// leading and trailing punctuation
QString lp = punctuationMatch.captured(1);
QString tp = punctuationMatch.captured(3);
// actual lyric
//QString actualLyric = punctuationMatch.captured(2);
Text leading(*this);
Lyrics leading(*this);
leading.setPlainText(lp);
leading.layout1();
Text trailing(*this);
Lyrics trailing(*this);
trailing.setPlainText(tp);
trailing.layout1();
leftAdjust = leading.width();
centerAdjust = leading.width() - trailing.width();
if (!lp.isEmpty() && lp[0].isDigit())
hasNumber = true;
#endif
}
}

Expand Down

0 comments on commit 6650189

Please sign in to comment.