From: Neil Puttock Date: Tue, 25 Oct 2011 16:02:47 +0000 (+0200) Subject: Fixes issue 1506 (X-axis overhang of StaffSymbol when RehearsalMarks present). X-Git-Tag: release/2.15.16-1~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=628b8b9906aacad72d9272eb42e16d8b50e9ff32;p=lilypond.git Fixes issue 1506 (X-axis overhang of StaffSymbol when RehearsalMarks present). The StaffSymbol uses better bounds now, excluding grobs like RehearsalMark and MetronomeMark. --- diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 6435554910..ed15db7d73 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -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;