Skip to content

Commit

Permalink
Merge pull request #850 from MarcSabatella/25454-unison-voices
Browse files Browse the repository at this point in the history
fix #25454: unisons should share noteheads despite duration difference
  • Loading branch information
lasconic committed Apr 19, 2014
2 parents 7e3ba1b + a13b0d9 commit 9296c7e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions libmscore/layout.cpp
Expand Up @@ -248,6 +248,8 @@ void Score::layoutChords1(Segment* segment, int staffIdx)
Note* p = overlapNotes[0];
for (int i = 0, count = overlapNotes.size(); i < count; ++i) {
Note* n = overlapNotes[i];
NoteHeadType nHeadType;
NoteHeadType pHeadType;
if (n->mirror()) {
if (separation < 0) {
// don't try to share heads if there is any mirroring
Expand All @@ -263,8 +265,10 @@ void Score::layoutChords1(Segment* segment, int staffIdx)
// unison
conflictUnison = true;
matchPending = false;
if (n->headGroup() != p->headGroup() || n->headType() != p->headType() || n->chord()->durationType() != p->chord()->durationType()
|| n->tpc() != p->tpc() || n->mirror() || p->mirror())
nHeadType = (n->headType() == NoteHeadType::HEAD_AUTO) ? n->chord()->durationType().headType() : n->headType();
pHeadType = (p->headType() == NoteHeadType::HEAD_AUTO) ? p->chord()->durationType().headType() : p->headType();
if (n->headGroup() != p->headGroup() || nHeadType != pHeadType || n->chord()->dots() != p->chord()->dots()
|| n->tpc() != p->tpc() || !n->chord()->stem() || !p->chord()->stem() || n->mirror() || p->mirror())
shareHeads = false;
break;
case 1:
Expand Down
Binary file added vtest/chord-layout-10-ref.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vtest/chord-layout-10.mscz
Binary file not shown.
Binary file modified vtest/chord-layout-7-ref.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vtest/chord-layout-9-ref.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vtest/gen
Expand Up @@ -23,7 +23,7 @@ else
emmentaler-8 bravura-8 emmentaler-9 bravura-9 emmentaler-10 bravura-10\
emmentaler-11 bravura-11 frametext ottava slurs-1\
chord-layout-1 chord-layout-2 chord-layout-3 chord-layout-4 chord-layout-5\
chord-layout-6 chord-layout-7 chord-layout-8 chord-layout-9\
chord-layout-6 chord-layout-7 chord-layout-8 chord-layout-9 chord-layout-10\
accidental-1 accidental-2 accidental-3 accidental-4 accidental-5 accidental-6\
tie-1 grace-1"
fi
Expand Down
2 changes: 1 addition & 1 deletion vtest/gen.bat
Expand Up @@ -10,7 +10,7 @@ set SRC=mmrest-1,bravura-mmrest,mmrest-2,mmrest-4,mmrest-5,mmrest-6,mmrest-7,mmr
emmentaler-6,bravura-6,emmentaler-7,bravura-7, ^
emmentaler-8,bravura-8,emmentaler-9,bravura-9,emmentaler-10,bravura-10, ^
chord-layout-1,chord-layout-2,chord-layout-3,chord-layout-4,chord-layout-5, ^
chord-layout-6,chord-layout-7,chord-layout-8,chord-layout-9, ^
chord-layout-6,chord-layout-7,chord-layout-8,chord-layout-9,chord-layout-10, ^
accidental-1,accidental-2,accidental-3,accidental-4,accidental-5,accidental-6, ^
tie-1,grace-1

Expand Down

0 comments on commit 9296c7e

Please sign in to comment.