Skip to content

Commit

Permalink
Refactored the references of Enharmonic Shortcuts
Browse files Browse the repository at this point in the history
Replaced the references of `enh-up` and `enh-down` to `enh-both` and `enh-current`
  • Loading branch information
dinukadesilva committed May 30, 2017
1 parent 1f9263b commit 034f2a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions mscore/data/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,11 @@
<seq>R</seq>
</SC>
<SC>
<key>enh-up</key>
<key>enh-both</key>
<seq>J</seq>
</SC>
<SC>
<key>enh-down</key>
<key>enh-current</key>
<seq>Ctrl+J</seq>
</SC>
<SC>
Expand Down
10 changes: 5 additions & 5 deletions mscore/scoreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2009,9 +2009,9 @@ void ScoreView::cmd(const QAction* a)
changeVoice(2);
else if (cmd == "voice-4")
changeVoice(3);
else if (cmd == "enh-up")
else if (cmd == "enh-both")
cmdChangeEnharmonic(true);
else if (cmd == "enh-down")
else if (cmd == "enh-current")
cmdChangeEnharmonic(false);
else if (cmd == "revision") {
Score* s = _score->masterScore();
Expand Down Expand Up @@ -3271,7 +3271,7 @@ void ScoreView::cmdAddHairpin(HairpinType type)
// cmdChangeEnharmonic
//---------------------------------------------------------

void ScoreView::cmdChangeEnharmonic(bool up)
void ScoreView::cmdChangeEnharmonic(bool both)
{
_score->startCmd();
Selection selection = _score->selection();
Expand All @@ -3281,7 +3281,7 @@ void ScoreView::cmdChangeEnharmonic(bool up)
if (staff->part()->instrument()->useDrumset())
continue;
if (staff->isTabStaff(n->tick())) {
int string = n->line() + (up ? 1 : -1);
int string = n->line() + (both ? 1 : -1);
int fret = staff->part()->instrument()->stringData()->fret(n->pitch(), string, staff, n->chord()->tick());
if (fret != -1) {
score()->undoChangeProperty(n, P_ID::FRET, fret);
Expand Down Expand Up @@ -3324,7 +3324,7 @@ void ScoreView::cmdChangeEnharmonic(bool up)
}
else {
n->undoSetTpc(tpc);
if (up || staff->part()->instrument(n->chord()->tick())->transpose().isZero()) {
if (both || staff->part()->instrument(n->chord()->tick())->transpose().isZero()) {
// change both spellings
int t = n->transposeTpc(tpc);
if (n->concertPitch())
Expand Down
4 changes: 2 additions & 2 deletions mscore/shortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2548,15 +2548,15 @@ Shortcut Shortcut::_sc[] = {
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY_STAFF_PITCHED | STATE_NOTE_ENTRY_STAFF_DRUM,
"enh-up",
"enh-both",
QT_TRANSLATE_NOOP("action","Change Enharmonic Spelling (Both Modes)"),
QT_TRANSLATE_NOOP("action","Change enharmonic spelling (both modes)"),
QT_TRANSLATE_NOOP("action","Change enharmonic note (alters the spelling in concert pitch and transposed mode)")
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY_STAFF_PITCHED | STATE_NOTE_ENTRY_STAFF_DRUM,
"enh-down",
"enh-current",
QT_TRANSLATE_NOOP("action","Change Enharmonic Spelling (Current Mode)"),
QT_TRANSLATE_NOOP("action","Change enharmonic spelling (current mode)"),
QT_TRANSLATE_NOOP("action","Change enharmonic note (alters the spelling in the current mode only)")
Expand Down

0 comments on commit 034f2a7

Please sign in to comment.