Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #32161: false collisions with crossstaff notes #1291

Merged
merged 1 commit into from Sep 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion libmscore/layout.cpp
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
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
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
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