Skip to content

Commit

Permalink
fix #227826: can't use Del key in text edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz authored and lasconic committed Jun 26, 2017
1 parent a161af4 commit 0189d44
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2771,8 +2771,6 @@ void MuseScore::changeState(ScoreState val)
a->setEnabled(cs && cs->selection().state() != SelState::NONE);
else if (enable && (s->key() == "copy"))
a->setEnabled(cs && (cs->selection().state() != SelState::NONE || val == STATE_FOTO));
else if (enable && (s->key() == "delete"))
a->setEnabled(cs && cs->selection().state() != SelState::NONE);
else if (enable && (s->key() == "select-similar-range"))
a->setEnabled(cs && cs->selection().state() == SelState::RANGE);
else if (enable && (s->key() == "synth-control")) {
Expand All @@ -2782,7 +2780,7 @@ void MuseScore::changeState(ScoreState val)
qDebug("disable synth control");
a->setEnabled(driver);
}
else if (s->key() == "pad-dot" || s->key() == "pad-dot-dot")
else if (s->key() == "pad-dot" || s->key() == "pad-dot-dot" || s->key() == "delete")
a->setEnabled(!(val & (STATE_ALLTEXTUAL_EDIT | STATE_EDIT)));

This comment has been minimized.

Copy link
@lasconic

lasconic Jun 27, 2017

Contributor

setEnabled is called later on in MuseScore::selectionChanged(). See 13da822#diff-3056168911c88e142262cb695efd9fdaR1276 and the delete action is enabled again.

else {
a->setEnabled(s->state() & val);
Expand Down

0 comments on commit 0189d44

Please sign in to comment.