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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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.

1 participant