Skip to content

Commit

Permalink
Merge pull request #6460 from MarcSabatella/309108-extension-quality
Browse files Browse the repository at this point in the history
fix #309108: add support for quality after extension
  • Loading branch information
anatoly-os committed Sep 1, 2020
2 parents bc4e2b5 + 51289cb commit 661e074
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions libmscore/chordlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,18 @@ bool ParsedChord::parse(const QString& s, const ChordList* cl, bool syntaxOnly,
tok2L = "5";
}
}
else if (diminished.contains(tok1)) {
_quality = "diminished";
if (!syntaxOnly) {
_xmlKind = "diminished";
_xmlText = _extension + tok1;
chord -= 4;
chord += 3;
chord -= 7;
chord += 6;
}
tok1L = "";
}
else if ((lower.contains(tok1L) || raise.contains(tok1L)) && tok2L == "") {
// trailing alteration - treat as applying to extension (and convert to modifier)
// this handles C5b, C9#, etc
Expand Down Expand Up @@ -1072,6 +1084,9 @@ bool ParsedChord::parse(const QString& s, const ChordList* cl, bool syntaxOnly,
tok1L = "#";
alter = true;
}
else if (tok1L == "") {
// token was already handled fully
}
else {
_understandable = false;
if (s.startsWith(tok1)) {
Expand Down

0 comments on commit 661e074

Please sign in to comment.