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 #40556: focus lost after change duration of note on offbeat #1532

Merged
merged 1 commit into from
Dec 14, 2014

Conversation

MarcSabatella
Copy link
Contributor

I looked at the git history and mostly understand what is going on here. I see that code was added to remember the selected element and then restore it later. The code was simply not added to the case of notes on offbeats (or more generally, whatever is actually being tested for in https://github.com/musescore/MuseScore/blame/master/libmscore/cmd.cpp#L1007).

My change here seems totally safe, and does fix the issue I see now. I simply restore the selection to selElement in the off-the-beat case just as we do in the on-the-beat case.

What I don't know is if there are also situations in this off-the-beat case where we should still be selecting "oc" like we do at https://github.com/musescore/MuseScore/blame/master/libmscore/cmd.cpp#L1024 in the on-the-beat case, and like we used to do at https://github.com/musescore/MuseScore/blame/master/libmscore/cmd.cpp#L1049 in the off-the-beat case before that line was commented out. That's because I don't know how to hit this line in the on-the-beat case, so I can't see if we need it here in the off-the-beat case too.

What I can see is, in the on-the-beat case, we only get here if "oc" is not zero, but in the off-the-beat case, it could be zero. So if we do choose to select it, it should probably as "else if (oc)" not just "else".

@lasconic
Copy link
Contributor

The correct issue is #40556

@MarcSabatella
Copy link
Contributor Author

Fixed commit message & rebased

@MarcSabatella MarcSabatella changed the title fix #40566: focus lost after change duration of note on offbeat fix #40556: focus lost after change duration of note on offbeat Dec 14, 2014
@lasconic
Copy link
Contributor

Thanks, let's start with this fix.

lasconic added a commit that referenced this pull request Dec 14, 2014
fix #40556: focus lost after change duration of note on offbeat
@lasconic lasconic merged commit eeb08ca into musescore:master Dec 14, 2014
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