Merge pull request #10236 from igorkorsukov/bugs/9996_go_to_top_staff

Added Go to top staff shortcut, and fixed selectTopStaff method
This commit is contained in:
RomanPudashkin 2022-01-14 20:14:09 +02:00 committed by GitHub
commit 76bce4fb5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 2 deletions

View file

@ -370,6 +370,11 @@
<seq>Ctrl+Alt+Up</seq>
<ctx>notation-focused</ctx>
</SC>
<SC>
<key>top-staff</key>
<seq></seq>
<ctx>notation-focused</ctx>
</SC>
<SC>
<key>first-element</key>
<seq>Ctrl+Home</seq>

View file

@ -370,6 +370,11 @@
<seq>Ctrl+Alt+Up</seq>
<ctx>notation-focused</ctx>
</SC>
<SC>
<key>top-staff</key>
<seq></seq>
<ctx>notation-focused</ctx>
</SC>
<SC>
<key>first-element</key>
<seq>Ctrl+Home</seq>

View file

@ -379,6 +379,11 @@
<seq>Ctrl+Alt+Up</seq>
<ctx>notation-focused</ctx>
</SC>
<SC>
<key>top-staff</key>
<seq></seq>
<ctx>notation-focused</ctx>
</SC>
<SC>
<key>first-element</key>
<seq>Ctrl+Home</seq>

View file

@ -2127,8 +2127,12 @@ void NotationInteraction::selectTopStaff()
if (score()->noteEntryMode()) {
score()->inputState().moveInputPos(el);
}
score()->select(el, SelectType::SINGLE, 0);
notifyAboutSelectionChanged();
if (el->type() == ElementType::CHORD) {
el = Ms::toChord(el)->upNote();
}
select({ el }, SelectType::SINGLE, 0);
}
void NotationInteraction::selectEmptyTrailingMeasure()