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: wrong repeats import for gp5 files #26655

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

mikekirin
Copy link
Contributor

No description provided.

@@ -923,6 +923,11 @@ void GuitarPro::createMeasures()
// m->setRepeatFlags(bars[i].repeatFlags);
m->setRepeatCount(bars[i].repeats); // supported in gp5

if (bars[i].repeatFlags == (mu::engraving::Repeat::START | mu::engraving::Repeat::END)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we not check this, we will ignore the cases when one bar has repeat start and repeat end.

@@ -923,7 +923,7 @@ bool GuitarPro5::read(IODevice* io)
}
if (barBits & SCORE_REPEAT_END) { // number of repeats
bar.repeatFlags = bar.repeatFlags | mu::engraving::Repeat::END;
bar.repeats = readUInt8() + 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is correct, but we have to do that for volta endings, not the bar repeats

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the same change for other GP readers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly. I will check them first and make separate PR if needed.

@mikekirin mikekirin merged commit 64bbda2 into musescore:master Feb 24, 2025
11 checks passed
@mikekirin mikekirin deleted the gp5-repeats-import-bug branch February 24, 2025 09:41
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.

2 participants