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 #271616: Fermata tempo is not applied when importing 2.X->3.0 score #3926

Merged
merged 1 commit into from Sep 7, 2018

Conversation

handrok
Copy link
Contributor

@handrok handrok commented Sep 6, 2018

  1. Add reading timeStretch for feramta from mscz
  2. Add calculating ticks for segments before first using fermata

@@ -2455,6 +2455,10 @@ void Score::getNextMeasure(LayoutContext& lc)
}

for (Segment& segment : measure->segments()) {
Segment* ns = segment.nextEnabled();
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@@ -3857,6 +3861,7 @@ void Score::doLayoutRange(int stick, int etick)

lc.prevMeasure = 0;

fixTicks();
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@anatoly-os anatoly-os Sep 6, 2018

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@handrok handrok force-pushed the fix#271616-Fermata_tempo branch 2 times, most recently from f536e18 to aad2a15 Compare September 6, 2018 11:15
@anatoly-os anatoly-os merged commit cb6a5c9 into musescore:master Sep 7, 2018
anatoly-os added a commit that referenced this pull request Sep 8, 2018
This reverts commit cb6a5c9.
These changes crash MuseScore when open some 2.06 scores.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants