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

Album::createScore now tries to append all excerpts (parts) for each score. #2138

Merged
merged 3 commits into from
Aug 6, 2015

Conversation

ericfont
Copy link
Contributor

If want to create joined mscz of an album of scores that all already contain pregenerated parts (called "excerpts" interally), then this fixes bug #70836 where only part excerpts from the first score are copied to joined score. Album::createScore now iterates over every part excerpt for every album item and appends it to the corresponding part excerpt of the joined score. That means that any part specific edits (e.g. part-specific spacings) are now copied over to the joined score. Note: for simplicity sake, I am assuming user has identical ordering of parts in each score. I am only testing to make sure that there are an equal number of part excerpts in each score and am testing that each part excerpt actually exists before trying to append, or else I display a meaningful qDebug message, and return failure so that the user gets presented with error popup. Any more testing (e.g. that the parts are named the same, use the same instruments, and have the same number of staves, etc.) I think is beyond of the scope of this bug as it would have made this fix much more complicated.

firstScore->doLayout();
for (int i=0; i<firstScore->excerpts().count(); i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you fix the spaces here?
for (int i = 0; i < firstScore->excerpts().count(); i++)

@ericfont
Copy link
Contributor Author

ericfont commented Aug 6, 2015

I think I fixed spacing. I did go through https://musescore.org/en/developers-handbook/musescore-coding-rules again, but I didn't see an explicitly stated rule about putting one space before and after operators in expressions, nor an explicitly stated rule about not putting a space immediately after opening parenthesis and immediately before closing parenthesis, although the example code does follow those rules implicitly. Maybe you should add those rules explicitly?

@ericfont
Copy link
Contributor Author

ericfont commented Aug 6, 2015

I edited the coding rules page to reflect what I think these rules are, but please verify that I wrote them correctly:

https://musescore.org/en/developers-handbook/musescore-coding-rules#Binary-Operators
https://musescore.org/en/developers-handbook/musescore-coding-rules#Expressions-in-Parenthesis

@lasconic
Copy link
Contributor

lasconic commented Aug 6, 2015

Perfect! Thank you for editing the guidelines!

lasconic added a commit that referenced this pull request Aug 6, 2015
Album::createScore now tries to append all excerpts (parts) for each score.
@lasconic lasconic merged commit e2bbe3f into musescore:master Aug 6, 2015
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