Skip to content

Commit

Permalink
fix #65041: breath interferes with chord symbol spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella authored and lasconic committed Jun 13, 2015
1 parent 94b8b47 commit 6551edd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
5 changes: 2 additions & 3 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3970,15 +3970,14 @@ qreal Score::computeMinWidth(Segment* fs, bool firstMeasureInSystem)
rest2[staffIdx] = true;

// space chord symbols separately from segments
if (hFound || eFound) {
if (hFound || spaceHarmony) {
qreal sp = 0.0;

// space chord symbols unless they miss each other vertically
if (hFound && hBbox.top() < hLastBbox[staffIdx].bottom() && hBbox.bottom() > hLastBbox[staffIdx].top())
sp = hRest[staffIdx] + minHarmonyDistance + hSpace.lw();

// barline: limit space to maxHarmonyBarDistance
else if (eFound && !hFound && spaceHarmony)
else if (spaceHarmony)
sp = qMin(hRest[staffIdx], maxHarmonyBarDistance);

hLastBbox[staffIdx] = hBbox;
Expand Down
5 changes: 2 additions & 3 deletions libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3415,15 +3415,14 @@ void Measure::layoutX(qreal stretch)
rest2[staffIdx] = true;

// space chord symbols separately from segments
if (hFound || eFound) {
if (hFound || spaceHarmony) {
qreal sp = 0.0;

// space chord symbols unless they miss each other vertically
if (hFound && hBbox.top() < hLastBbox[staffIdx].bottom() && hBbox.bottom() > hLastBbox[staffIdx].top())
sp = hRest[staffIdx] + minHarmonyDistance + hSpace.lw();

// barline: limit space to maxHarmonyBarDistance
else if (eFound && spaceHarmony)
else if (spaceHarmony)
sp = qMin(hRest[staffIdx], maxHarmonyBarDistance);

hLastBbox[staffIdx] = hBbox;
Expand Down
3 changes: 2 additions & 1 deletion vtest/gen
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ else
accidental-1 accidental-2 accidental-3 accidental-4 accidental-5\
accidental-6 accidental-7 accidental-8 accidental-9 accidental-10\
tie-1 tie-2 tie-3 grace-1 grace-2 grace-3 grace-4 tuplets-1 tuplets-2 breath-1\
harmony-1 harmony-2 harmony-3 harmony-4 harmony-5 harmony-6 harmony-7 harmony-8 harmony-9 harmony-10 harmony-11\
harmony-1 harmony-2 harmony-3 harmony-4 harmony-5 harmony-6 harmony-7
harmony-8 harmony-9 harmony-10 harmony-11 harmony-12\
beams-1 beams-2 beams-3 beams-4 beams-5 beams-6 beams-7 beams-8 beams-9 beams-10\
beams-11 beams-12 beams-13 beams-14 beams-15 beams-16 beams-17\
user-offset-1 user-offset-2 chord-space-1 chord-space-2 tablature-1 image-1\
Expand Down
3 changes: 2 additions & 1 deletion vtest/gen.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ set SRC=mmrest-1,bravura-mmrest,gonville-mmrest,mmrest-2,mmrest-4,mmrest-5,mmres
accidental-1,accidental-2,accidental-3,accidental-4,accidental-5, ^
accidental-6,accidental-7,accidental-8,accidental-9,accidental-10, ^
tie-1,tie-2,tie-3,grace-1,grace-2,grace-3,grace-4,tuplets-1,tuplets-2,breath-1, ^
harmony-1,harmony-2,harmony-3,harmony-4,harmony-5,harmony-6,harmony-7,harmony-8,harmony-9,harmony-10,harmony-11, ^
harmony-1,harmony-2,harmony-3,harmony-4,harmony-5,harmony-6,harmony-7, ^
harmony-8,harmony-9,harmony-10,harmony-11,harmony-12, ^
beams-1,beams-2,beams-3,beams-4,beams-5,beams-6,beams-7,beams-8,beams-9,beams-10, ^
beams-11,beams-12,beams-13,beams-14,beams-15,beams-16,beams-17, ^
user-offset-1,user-offset-2,chord-space-1,chord-space-2,tablature-1,image-1, ^
Expand Down
Binary file added vtest/harmony-12-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/harmony-12.mscz
Binary file not shown.

0 comments on commit 6551edd

Please sign in to comment.