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

Port PRs from 3.x #7528

Merged
merged 7 commits into from
Feb 15, 2021
Merged

Conversation

mattmcclinch
Copy link
Contributor

This is a port of the following PRs from 3.x to the master branch:

#7261 Allow beaming across crotchet rests.
#7373 Fix #316441: Crash when changing time signature in front of a corrupted measure.
#7384 Fix #316797: Deleting a breath/caesura selects the wrong note.
#7396 Fix #316754: Empty rehearsal mark not deleted after entering a line break.
#7403 Fix #305777: Make applying tremolo a toggle operation.
#7407 Fix #316679: Segmentation Fault when opening a file with a missing section break element.
#7412 Fix #316555: Invisible breath shouldn't impact layout.

…ed measure

Resolves: https://musescore.org/en/node/316441.

Modified checkRest() so that it returns true on success or false on failure, instead of causing the program to crash if the end of the measure list is reached prematurely. This allows us to safely back out of a track list rewrite in the case of a time signature change in front of a corrupted measure.
Resolves: https://musescore.org/en/node/316797.

Since caesuras are placed after the selected note/rest, it makes sense that when the caesura is deleted, we should select the note/rest that precedes the caesura (in the same track).
…reak

Resolves: https://musescore.org/en/node/316754.

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
…ction break element

Resolves: https://musescore.org/en/node/316679.

The LayoutBreak class failed to override Element::subtype(), causing a LayoutBreak of type LINE to be considered a match for a LayoutBreak of type SECTION when determining which elements to reuse from a previous incarnation of an MMRest.
Resolves: https://musescore.org/en/node/316555.

Allows Segment::allElementsInvisible() to return true for breath segments if all elements in the segment are invisible.
@RomanPudashkin RomanPudashkin merged commit c2cdc92 into musescore:master Feb 15, 2021
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