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 #304051: repeat single note in normal mode #6140

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

MarcSabatella
Copy link
Contributor

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

Lately there has been much discussion of the "R" command
and the fact that it only works on range selections.
In Sibelius, the same command is more general.
While it's not obvious what results might be expected
in each and every case, the most important request here
has been for "R" to work with a single note selected (not a range).

This change implements that very simply by checking for this case
and creating a range selection first.
Currently we generate a debug error message then simply do nothing.
So the change does not change anything about how the command works
except to allow it to do something reasonable
in the case of a single note/rest selected.

Note because a range selection is created, this means
selecting a single note in a chord repeats the whole chord.
That is how the command works in note input mode,
and it is how Sibelius works.

return;
ChordRest* cr = _score->getSelectedChordRest();
if (!cr)
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

4 space indent here, but 6 else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arrgh! I set up a new build environment and hadn't bothered installing my usual formatting because I knew it was changing, so I was using the QtCreator defaults and fixing them manually. Missed this one, thanks for catching. Harmless in the end I guess, but still...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix pushed

Copy link
Contributor

Choose a reason for hiding this comment

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

of course harmless

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

Lately there has been much discussion of the "R" command
and the fact that it only works on range selections.
In Sibelius, the same command is more general.
While it's not obvious what results might be expected
in each and every case, the most important request here
has been for "R" to work with a single note selected (not a range).

This change implements that very simply by checking for this case
and creating a range selection first.
Currently we generate a debug error message then simply do nothing.
So the change does not change anything about how the command works
except to allow it to do something reasonable
in the case of a single note/rest selected.

Note because a range selection is created, this means
selecting a single note in a chord repeats the whole chord.
That is how the command works in note input mode,
and it is how Sibelius works.
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.

4 participants