Skip to content

Commit

Permalink
fix #32161: false collisions with crossstaff notes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Sep 8, 2014
1 parent b7c2b5e commit 7f2c2e8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ void Score::layoutChords1(Segment* segment, int staffIdx)

Note* bottomUpNote = upStemNotes.first();
Note* topDownNote = downStemNotes.last();
int separation = topDownNote->line() - bottomUpNote->line();
int separation;
if (bottomUpNote->chord()->staffMove() == topDownNote->chord()->staffMove())
separation = topDownNote->line() - bottomUpNote->line();
else
separation = 2; // no conflict
QList<Note*> overlapNotes;

if (separation == 1) {
Expand Down
Binary file added vtest/cross-1-ref.png
Loading
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/cross-1.mscz
Binary file not shown.
2 changes: 1 addition & 1 deletion vtest/gen
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else
emmentaler-11 bravura-11 frametext ottava slurs-1 slurs-2 hairpins-1 pedal-1 line-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-10\
chord-layout-11 chord-layout-12 chord-layout-13 chord-layout-14\
chord-layout-11 chord-layout-12 chord-layout-13 chord-layout-14 cross-1\
accidental-1 accidental-2 accidental-3 accidental-4 accidental-5\
accidental-6 accidental-7 accidental-8 accidental-9\
tie-1 tie-2 grace-1 grace-2 grace-3 harmony-1 harmony-2 harmony-3 beams-1 beams-2\
Expand Down
2 changes: 1 addition & 1 deletion vtest/gen.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set SRC=mmrest-1,bravura-mmrest,mmrest-2,mmrest-4,mmrest-5,mmrest-6,mmrest-7,mmr
emmentlar-11,bravura-11,frametext,ottava,slurs-1,slurs-2,hairpins-1,pedal-1,line-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-10, ^
chord-layout-11,chord-layout-12,chord-layout-13,chord-layout-13, ^
chord-layout-11,chord-layout-12,chord-layout-13,chord-layout-14,cross-1, ^
accidental-1,accidental-2,accidental-3,accidental-4,accidental-5, ^
accidental-6,accidental-7,accidental-8,accidental-9, ^
tie-1,tie-2,grace-1,grace-2,grace-3,harmony-1,harmony-2,harmony-3,beams-1,beams-2, ^
Expand Down

0 comments on commit 7f2c2e8

Please sign in to comment.