Merge pull request #493 from mgavioli/Fix-22870_rests_cannot_be_entered_in_TABs

Fix #22870 - No shortcut available to enter rests in TAB's
This commit is contained in:
Maurizio M. Gavioli 2013-09-27 15:53:39 -07:00
commit f22582792b
4 changed files with 17 additions and 4 deletions

View file

@ -2261,6 +2261,14 @@ Shortcut Shortcut::sc[] = {
QT_TRANSLATE_NOOP("action","Decrease active duration (TAB)"),
QT_TRANSLATE_NOOP("action","Decrease active duration (TAB)")
),
Shortcut(
STATE_NOTE_ENTRY_TAB,
0,
"rest-TAB",
QT_TRANSLATE_NOOP("action","Rest (TAB)"),
QT_TRANSLATE_NOOP("action","Enter rest (TAB)"),
quartrest_ICON
),
Shortcut(
STATE_NOTE_ENTRY_TAB,
0,

View file

@ -823,6 +823,10 @@
<key>pad-note-decrease-TAB</key>
<seq>Q</seq>
</SC>
<SC>
<key>rest-TAB</key>
<seq>'</seq>
</SC>
<SC>
<key>string-above</key>
<seq>Up</seq>
@ -874,13 +878,14 @@
<SC>
<key>fret-8</key>
<seq>8</seq>
<seq>J</seq>
<seq>I</seq>
</SC>
<SC>
<key>fret-9</key>
<seq>9</seq>
<seq>K</seq>
</SC>
<!-- HARMONY / FIGURED BASS specific shortcuts -->
<SC>
<key>advance-longa</key>
<seq>Ctrl+9</seq>

View file

@ -2430,10 +2430,10 @@ void MuseScore::changeState(ScoreState val)
// return;
static const char* stdNames[] = {
"note-longa", "note-breve", "pad-note-1", "pad-note-2", "pad-note-4",
"pad-note-8", "pad-note-16", "pad-note-32", "pad-note-64", "pad-note-128", "pad-rest"};
"pad-note-8", "pad-note-16", "pad-note-32", "pad-note-64", "pad-note-128", "pad-rest", "rest"};
static const char* tabNames[] = {
"note-longa-TAB", "note-breve-TAB", "pad-note-1-TAB", "pad-note-2-TAB", "pad-note-4-TAB",
"pad-note-8-TAB", "pad-note-16-TAB", "pad-note-32-TAB", "pad-note-64-TAB", "pad-note-128-TAB", "pad-rest-TAB"};
"pad-note-8-TAB", "pad-note-16-TAB", "pad-note-32-TAB", "pad-note-64-TAB", "pad-note-128-TAB", "pad-rest-TAB", "rest-TAB"};
bool intoTAB = (_sstate != STATE_NOTE_ENTRY_TAB) && (val == STATE_NOTE_ENTRY_TAB);
bool fromTAB = (_sstate == STATE_NOTE_ENTRY_TAB) && (val != STATE_NOTE_ENTRY_TAB);
// if activating TAB note entry, swap "pad-note-...-TAB" shorctuts into "pad-note-..." actions

View file

@ -2709,7 +2709,7 @@ void ScoreView::cmd(const QAction* a)
updateAll();
}
}
else if (cmd == "rest")
else if (cmd == "rest" || cmd == "rest-TAB")
cmdEnterRest();
else if (cmd == "rest-1")
cmdEnterRest(TDuration(TDuration::V_WHOLE));