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 #181656: layout glitch after hbox on undo #3110

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

MarcSabatella
Copy link
Contributor

My previous fix in #3052 had an unfortunate side effect: now that we pay attention to break hints on hboxes, we start to see that they are actually set inappropriately on "internal" hboxes. That is, hboxes within a system row. That's because they are seen as ending a system, and the code that sets the break hints does so system by system. So now we are actually always breaking after hboxes while in undo state - the first layout after an undo.

This current PR moves the setting of break hints from Score::layoutSystem() to Score::layoutSystemRow(), and checks to only set the hint to true on the last measurebase of the row, not on the last measure of each system.

This fixes the current problem without compromising the fix to the previous problem. I can't swear it doesn't have some other unforeseen side effect. But all this break hint stuff only affects layout in undo state, so worst case is there is some other temporary glitch on undo.

It wouldn't break my heart to simply revert the fix in #3052 (thus leaving the previous bug unfixed for 2.1). This all becomes moot for 3.0 it seems anyhow. But I do think this current PR is the "right" solution, at least to the extent I understand how these break hints are designed to work.

@lasconic lasconic merged commit 83f0ade into musescore:2.1 Mar 28, 2017
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