]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fixes issue 1506 (X-axis overhang of StaffSymbol when RehearsalMarks present).
authorNeil Puttock <n.puttock@gmail.com>
Tue, 25 Oct 2011 16:02:47 +0000 (18:02 +0200)
committerGraham Percival <graham@percival-music.ca>
Wed, 26 Oct 2011 07:31:34 +0000 (08:31 +0100)
The StaffSymbol uses better bounds now, excluding grobs like RehearsalMark
and MetronomeMark.

lily/staff-symbol.cc

index 6435554910fd77f15017883070bfd7a7575efa1b..ed15db7d739c09930ea59b762766ae54f11a778e 100644 (file)
@@ -22,6 +22,7 @@
 #include "lookup.hh"
 #include "dimensions.hh"
 #include "output-def.hh"
+#include "paper-column.hh"
 #include "warn.hh"
 #include "item.hh"
 #include "staff-symbol-referencer.hh"
@@ -66,10 +67,10 @@ Staff_symbol::print (SCM smob)
         {
           Item *x = sp->get_bound (d);
 
-          span_points[d] = x->relative_coordinate (common, X_AXIS);
-          if (!x->break_status_dir ()
-              && !x->extent (x, X_AXIS).is_empty ())
-            span_points[d] += x->extent (x, X_AXIS)[d];
+          span_points[d] = ((!x->break_status_dir ()
+                             && !x->extent (x, X_AXIS).is_empty ())
+                            ? Paper_column::break_align_width (x, ly_symbol2scm ("break-alignment"))[d]
+                            : x->relative_coordinate (common, X_AXIS));
         }
 
       span_points[d] -= d * t / 2;