X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faxis-group-interface.cc;h=c9c56858a17a071bb38a7038820bee6812b8c4f3;hb=cee6cea4ed55eb4fa1f9d83c997ebc19744a6e1a;hp=eabb81adaf4ae5af4a83145728d37ff1b60f9159;hpb=958e95822083954cad00e0a598eb9f12ceba67b9;p=lilypond.git diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index eabb81adaf..c9c56858a1 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -101,7 +101,7 @@ Axis_group_interface::relative_maybe_bound_group_extent (vector const &e Grob *se = elts[i]; if (!to_boolean (se->get_property ("cross-staff"))) { - Interval dims = (bound && has_interface (se) + Interval dims = (bound && has_interface (se) ? generic_bound_extent (se, common, a) : se->extent (common, a)); if (!dims.is_empty ()) @@ -150,6 +150,8 @@ Interval Axis_group_interface::part_of_line_pure_height (Grob *me, bool begin, int start, int end) { Spanner *sp = dynamic_cast (me); + if (!sp) + return Interval (0, 0); SCM cache_symbol = begin ? ly_symbol2scm ("begin-of-line-pure-height") : ly_symbol2scm ("rest-of-line-pure-height"); @@ -282,7 +284,7 @@ Axis_group_interface::adjacent_pure_heights (SCM smob) if (g->pure_is_visible (start, visibility_end)) { - Interval dims = g->pure_height (common, start, end); + Interval dims = g->pure_y_extent (common, start, end); if (!dims.is_empty ()) { if (rank_span[LEFT] <= start) @@ -328,7 +330,7 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end) reasonably safe to assume that if our parent is a VerticalAlignment, we can assume additivity and cache things nicely. */ Grob *p = me->get_parent (Y_AXIS); - if (p && Align_interface::has_interface (p)) + if (has_interface (p)) return Axis_group_interface::sum_partial_pure_heights (me, start, end); Grob *common = unsmob (me->get_object ("pure-Y-common")); @@ -342,9 +344,9 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end) if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start && g->pure_is_visible (start, end) && !(to_boolean (g->get_property ("cross-staff")) - && Stem::has_interface (g))) + && has_interface (g))) { - Interval dims = g->pure_height (common, start, end); + Interval dims = g->pure_y_extent (common, start, end); if (!dims.is_empty ()) r.unite (dims); } @@ -441,7 +443,7 @@ 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++) - if (!(Stem::has_interface (elts[i]) + if (!(has_interface (elts[i]) && to_boolean (elts[i]->get_property ("cross-staff")))) (void) elts[i]->get_property ("vertical-skylines"); @@ -533,7 +535,7 @@ Axis_group_interface::calc_pure_y_common (SCM smob) extract_grob_set (me, "pure-relevant-grobs", elts); Grob *common = common_refpoint_of_array (elts, me, Y_AXIS); - if (common != me && Align_interface::has_interface (common)) + if (common != me && has_interface (common)) { me->programming_error("My pure_y_common is a VerticalAlignment," " which might contain several staves."); @@ -597,7 +599,7 @@ Axis_group_interface::get_children (Grob *me, vector *found) { found->push_back (me); - if (!has_interface (me)) + if (!has_interface (me)) return; extract_grob_set (me, "elements", elements);