]> git.donarmstrong.com Git - lilypond.git/commitdiff
Prevents scripts in cross-staff contexts from colliding with span bars.
authorMike Solomon <mike@apollinemike.com>
Fri, 16 Dec 2011 08:08:48 +0000 (09:08 +0100)
committerMike Solomon <mike@apollinemike.com>
Fri, 16 Dec 2011 08:08:48 +0000 (09:08 +0100)
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.

input/regression/span-bar-articulation.ly [new file with mode: 0644]
lily/axis-group-interface.cc

diff --git a/input/regression/span-bar-articulation.ly b/input/regression/span-bar-articulation.ly
new file mode 100644 (file)
index 0000000..ee86754
--- /dev/null
@@ -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.}
+>>
index 3f53773e9e6e1207d5bbc63331cccdd32a99b1f7..31e5b9901cdcfdb3d130aa6ee3e94d42ac3aae3e 100644 (file)
@@ -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<int> 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 ())