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 #271616: Fermata tempo is not applied when importing 2.X->3.0 score #3926
Conversation
handrok
commented
Sep 6, 2018
- Add reading timeStretch for feramta from mscz
- Add calculating ticks for segments before first using fermata
libmscore/layout.cpp
Outdated
@@ -2455,6 +2455,10 @@ void Score::getNextMeasure(LayoutContext& lc) | |||
} | |||
|
|||
for (Segment& segment : measure->segments()) { | |||
Segment* ns = segment.nextEnabled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call it nextSegment
. The code becomes clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextEnabled() is not a new method. And it doesn't return nextSegment. It return next enabled segment.
libmscore/layout.cpp
Outdated
@@ -3857,6 +3861,7 @@ void Score::doLayoutRange(int stick, int etick) | |||
|
|||
lc.prevMeasure = 0; | |||
|
|||
fixTicks(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to reset applied tempo. Because tempo is setted in layout. And if we don't reset tempo new timeStretch is applied to the last applied timeStretch. It lead to twice timeStretch, next triple e.t.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is worth adding this info to the comment placed one line above calling this method in code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
f536e18
to
aad2a15
Compare
aad2a15
to
8422a7d
Compare
This reverts commit cb6a5c9. These changes crash MuseScore when open some 2.06 scores.