Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #288014: write melisma ticks in a 3.0.5-compatible way #4967

Merged
merged 1 commit into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions libmscore/lyrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ void Lyrics::write(XmlWriter& xml) const
};
xml.tag("syllabic", sl[int(_syllabic)]);
}
xml.tag("ticks", _ticks.ticks(), 0); // pre-3.1 compatibility: write integer ticks under <ticks> tag
writeProperty(xml, Pid::LYRIC_TICKS);

TextBase::writeProperties(xml);
Expand Down Expand Up @@ -135,6 +136,8 @@ bool Lyrics::readProperties(XmlReader& e)
qDebug("bad syllabic property");
}
else if (tag == "ticks") // obsolete
_ticks = e.readFraction(); // will fall back to reading integer ticks on older scores
else if (tag == "ticks_f")
_ticks = e.readFraction();
else if (readProperty(tag, e, Pid::PLACEMENT))
;
Expand Down
2 changes: 1 addition & 1 deletion libmscore/property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static constexpr PropertyMetaData propertyList[] = {
{ Pid::VERSE, true, "no", P_TYPE::ZERO_INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "verse") },

{ Pid::SYLLABIC, true, "syllabic", P_TYPE::INT, DUMMY_QT_TRANSLATE_NOOP("propertyName", "syllabic") },
{ Pid::LYRIC_TICKS, true, "ticks", P_TYPE::FRACTION, DUMMY_QT_TRANSLATE_NOOP("propertyName", "ticks") },
{ Pid::LYRIC_TICKS, true, "ticks_f", P_TYPE::FRACTION, DUMMY_QT_TRANSLATE_NOOP("propertyName", "ticks") },
{ Pid::VOLTA_ENDING, true, "endings", P_TYPE::INT_LIST, DUMMY_QT_TRANSLATE_NOOP("propertyName", "endings") },
{ Pid::LINE_VISIBLE, true, "lineVisible", P_TYPE::BOOL, DUMMY_QT_TRANSLATE_NOOP("propertyName", "visible line") },
{ Pid::MAG, false, "mag", P_TYPE::REAL, DUMMY_QT_TRANSLATE_NOOP("propertyName", "mag") },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@
<durationType>eighth</durationType>
<Lyrics>
<syllabic>end</syllabic>
<ticks>1/4</ticks>
<ticks>480</ticks>
<ticks_f>1/4</ticks_f>
<text>min</text>
</Lyrics>
<Note>
Expand Down Expand Up @@ -310,7 +311,8 @@
<durationType>eighth</durationType>
<Lyrics>
<syllabic>end</syllabic>
<ticks>1/4</ticks>
<ticks>480</ticks>
<ticks_f>1/4</ticks_f>
<text>min</text>
</Lyrics>
<Note>
Expand Down
3 changes: 2 additions & 1 deletion mtest/libmscore/spanners/lyricsline02-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
<Chord>
<durationType>quarter</durationType>
<Lyrics>
<ticks>1/4</ticks>
<ticks>480</ticks>
<ticks_f>1/4</ticks_f>
<text>A</text>
</Lyrics>
<Note>
Expand Down
3 changes: 2 additions & 1 deletion mtest/libmscore/spanners/lyricsline02.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
<Chord>
<durationType>quarter</durationType>
<Lyrics>
<ticks>3/4</ticks>
<ticks>1440</ticks>
<ticks_f>3/4</ticks_f>
<text>A</text>
</Lyrics>
<Note>
Expand Down
3 changes: 2 additions & 1 deletion mtest/libmscore/spanners/lyricsline03.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
<Chord>
<durationType>quarter</durationType>
<Lyrics>
<ticks>3/4</ticks>
<ticks>1440</ticks>
<ticks_f>3/4</ticks_f>
<text>A</text>
</Lyrics>
<Note>
Expand Down
3 changes: 2 additions & 1 deletion mtest/libmscore/spanners/lyricsline04.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
<Chord>
<durationType>quarter</durationType>
<Lyrics>
<ticks>1/4</ticks>
<ticks>480</ticks>
<ticks_f>1/4</ticks_f>
<text>A</text>
</Lyrics>
<Note>
Expand Down
3 changes: 2 additions & 1 deletion mtest/libmscore/spanners/lyricsline05-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
<Chord>
<durationType>quarter</durationType>
<Lyrics>
<ticks>1/4</ticks>
<ticks>480</ticks>
<ticks_f>1/4</ticks_f>
<text>A</text>
</Lyrics>
<Note>
Expand Down
3 changes: 2 additions & 1 deletion mtest/libmscore/spanners/lyricsline05.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
<Chord>
<durationType>quarter</durationType>
<Lyrics>
<ticks>5/4</ticks>
<ticks>2400</ticks>
<ticks_f>5/4</ticks_f>
<text>A</text>
</Lyrics>
<Note>
Expand Down