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 #306807: Crash on [Go to first empty trailing measure] command with specific circumstance #6223

Merged

Conversation

worldwideweary
Copy link
Contributor

@worldwideweary worldwideweary commented Jun 17, 2020

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

New navigation commands were implemented into 3.x (#5620 for Master -> manually added into 3.5). After 3.5Beta release, I've run into one problem that I didn't catch earlier: If issuing "Go To First Empty Trailing Measure" when there is no selection at all whatsoever + there is no first empty trailing measure, then a crash occurs! Obviously that needed to be fixed, so this PR makes sure that under that circumstance, instead of crashing, and instead of doing nothing, the result is to take the user to the last measure of the score. With this change, I had to also be consistent with the use case when using a specific staff with the same problem, i.e., no empty trailing measure. Before, nothing would happen and then the issuing of the command would be exactly equivalent to entering into Note Entry at current location. Now, this is congruous with no selection at all: take the user to the last measure, only retain the current staff in this instance.

Now I can not get this to crash at all, and in a sense there's some added functionality in that this doubles-down in allowing the user to go to the end of the score if the score is already full or has no empty trailing measure rather than doing nothing.

P.S. I will need to update accordingly the open PR mentioned at the top of this description for the master branch which has yet to be merged.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made
    (Passes online testing)

@worldwideweary worldwideweary changed the title #306807: Fix Crash Case with Empty Trailing Measure command Fix #306807: Crash on [Go to first empty trailing measure] command with specific circumstance Jun 17, 2020
@anatoly-os anatoly-os merged commit e6a5379 into musescore:3.x Jun 20, 2020
anatoly-os added a commit that referenced this pull request Aug 11, 2020
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