From 17459ab4a86219a408cd814ab9ffbdb7dae0843b Mon Sep 17 00:00:00 2001 From: Keith OHara Date: Wed, 21 Aug 2013 23:16:50 -0700 Subject: [PATCH] Extents of a NoteColumn with a cross-staff stem; issue 3385 axis-group-interface::extent() can exclude cross-staff elements of the group, as it did before 7d3d28de0ce6e2f018aff599cecd944d1754fe3c pure_*_skylines_from_extents() cannot use x-extents because at least NoteHead::X-offset depends on stem direction and is not a pure function. --- lily/axis-group-interface.cc | 4 +++- lily/stencil-integral.cc | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 0d786c3a29..7be90d1a89 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -456,7 +456,9 @@ Axis_group_interface::generic_group_extent (Grob *me, Axis a) /* trigger the callback to do skyline-spacing on the children */ if (a == Y_AXIS) for (vsize i = 0; i < elts.size (); i++) - (void) elts[i]->get_property ("vertical-skylines"); + if (!(Stem::has_interface (elts[i]) + && to_boolean (elts[i]->get_property ("cross-staff")))) + (void) elts[i]->get_property ("vertical-skylines"); Grob *common = common_refpoint_of_array (elts, me, a); diff --git a/lily/stencil-integral.cc b/lily/stencil-integral.cc index 654ecdd5ab..dbd11f890e 100644 --- a/lily/stencil-integral.cc +++ b/lily/stencil-integral.cc @@ -996,9 +996,9 @@ Grob::pure_simple_vertical_skylines_from_extents (SCM smob, SCM begscm, SCM ends Grob *me = unsmob_grob (smob); int beg = robust_scm2int (begscm, 0); int end = robust_scm2int (endscm, INT_MAX); - // We cannot measure the width of a spanner before line breaking, - // so we assume that the width is infinite. - return maybe_pure_internal_simple_skylines_from_extents (me, X_AXIS, true, beg, end, dynamic_cast (me), false); + // We cannot measure the widths before line breaking, + // so we assume that the width is infinite: pass ignore_x=true + return maybe_pure_internal_simple_skylines_from_extents (me, X_AXIS, true, beg, end, true, false); } MAKE_SCHEME_CALLBACK (Grob, simple_vertical_skylines_from_extents, 1); -- 2.39.5