From: Mike Solomon Date: Fri, 16 Dec 2011 08:08:48 +0000 (+0100) Subject: Prevents scripts in cross-staff contexts from colliding with span bars. X-Git-Tag: release/2.15.23-1~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5543eb5b0378bc726684a686b799e4ff4dc5f4cc;p=lilypond.git Prevents scripts in cross-staff contexts from colliding with span bars. This is done by not ignoring cross-staff grobs in axis-group-interface pure height calculations save stems, whose pure height calculation would lead to a circular dependency. --- diff --git a/input/regression/span-bar-articulation.ly b/input/regression/span-bar-articulation.ly new file mode 100644 index 0000000000..ee86754354 --- /dev/null +++ b/input/regression/span-bar-articulation.ly @@ -0,0 +1,13 @@ +\version "2.15.22" + +\header { + texidoc = "Articulations on cross-staff stems do not collide with +span bars." +} + +\new GrandStaff << + \new Staff = "a" {g1 R s } + \new Staff = "b" { + \clef bass R1 r2. g8( b | + d'\prall\espressivo \change Staff="a" b') g'2.} +>> diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 3f53773e9e..31e5b9901c 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -31,6 +31,7 @@ #include "separation-item.hh" #include "skyline-pair.hh" #include "staff-grouper-interface.hh" +#include "stem.hh" #include "stencil.hh" #include "system.hh" #include "warn.hh" @@ -326,7 +327,8 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end) Interval_t rank_span = g->spanned_rank_interval (); if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start && g->pure_is_visible (start, end) - && !to_boolean (g->get_property ("cross-staff"))) + && !(to_boolean (g->get_property ("cross-staff")) + && Stem::has_interface (g))) { Interval dims = g->pure_height (common, start, end); if (!dims.is_empty ())