]> git.donarmstrong.com Git - lilypond.git/commitdiff
Extents of a NoteColumn with a cross-staff stem; issue 3385
authorKeith OHara <k-ohara5a5a@oco.net>
Thu, 22 Aug 2013 06:16:50 +0000 (23:16 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Tue, 27 Aug 2013 18:19:49 +0000 (11:19 -0700)
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
lily/stencil-integral.cc

index 0d786c3a2959aa201470f761c27ee3cd6a98645d..7be90d1a89a61190d0a1d84c2254679bc2a9b35a 100644 (file)
@@ -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);
 
index 654ecdd5ab268e8b79cb3af289074158db8c169a..dbd11f890eb0419e7e269d27edb6401c78da121d 100644 (file)
@@ -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<Spanner *> (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);