Skip to content

Commit

Permalink
Merge pull request #6111 from mattmcclinch/305814-add-interval
Browse files Browse the repository at this point in the history
Fix #305814: Adding Intervals via "alt + number" command
  • Loading branch information
anatoly-os committed May 25, 2020
1 parent c121eef commit 771ba6a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mscore/scoreview.cpp
Expand Up @@ -2387,7 +2387,16 @@ void ScoreView::cmd(const char* s)
"interval8", "interval-8",
"interval9", "interval-9"}, [](ScoreView* cv, const QByteArray& cmd) {
int n = cmd.mid(8).toInt();
std::vector<Note*> nl = cv->score()->selection().noteList();
std::vector<Note*> nl;
if (cv->score()->selection().isRange()) {
for (ChordRest* cr : cv->score()->getSelectedChordRests()) {
if (cr->isChord())
nl.push_back(n > 0 ? toChord(cr)->upNote() : toChord(cr)->downNote());
}
}
else {
nl = cv->score()->selection().noteList();
}
if (!nl.empty()) {
//if (!noteEntryMode())
// ; // TODO: state sm->postEvent(new CommandEvent("note-input"));
Expand Down

0 comments on commit 771ba6a

Please sign in to comment.