]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 369.
authorJoe Neeman <joeneeman@gmail.com>
Sat, 18 Aug 2007 03:45:48 +0000 (13:45 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 18 Aug 2007 03:45:48 +0000 (13:45 +1000)
When a slur goes over cross-staff stems, the slur should be marked cross-staff
too.

input/regression/slur-cross-staff-beam.ly [new file with mode: 0644]
lily/slur.cc

diff --git a/input/regression/slur-cross-staff-beam.ly b/input/regression/slur-cross-staff-beam.ly
new file mode 100644 (file)
index 0000000..ea9d13d
--- /dev/null
@@ -0,0 +1,13 @@
+\version "2.11.29"
+
+\header {
+  texidoc = "Slurs that depend on a cross-staff beam are not calculated until after line-breaking."
+}
+
+\paper{ ragged-right=##t }
+\score {
+    \new PianoStaff <<
+    \context Staff = rh \relative { c'8([ d) \change Staff = lh c,] }
+    \context Staff = lh { s4. }
+    >>
+}
\ No newline at end of file
index 22535ef7658c2c9ef8f8d65a96ff4c289ac4d6cd..c37aa72ad9b53a98cd6e395fa9e8b0da5e8ade96 100644 (file)
@@ -14,6 +14,7 @@
 #include "bezier.hh"
 #include "directional-element-interface.hh"
 #include "font-interface.hh"
+#include "item.hh"
 #include "pointer-group-interface.hh"
 #include "lookup.hh"
 #include "main.hh"             // DEBUG_SLUR_SCORING
@@ -368,6 +369,13 @@ Slur::calc_cross_staff (SCM smob)
   extract_grob_set (me, "note-columns", cols);
   extract_grob_set (me, "encompass-objects", extras);
 
+  for (vsize i = 0; i < cols.size (); i++)
+    {
+      if (Grob *s = Note_column::get_stem (cols[i]))
+       if (to_boolean (s->get_property ("cross-staff")))
+         return SCM_BOOL_T;
+    }
+
   /* the separation items are dealt with in replace_breakable_encompass_objects
      so we can ignore them here */
   vector<Grob*> non_sep_extras;