From: Joe Neeman Date: Sat, 18 Aug 2007 03:45:48 +0000 (+1000) Subject: Fix 369. X-Git-Tag: release/2.11.30-1~16 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cc28c86747ee1e32d6c42e7737e47efcec74f59a;p=lilypond.git Fix 369. When a slur goes over cross-staff stems, the slur should be marked cross-staff too. --- diff --git a/input/regression/slur-cross-staff-beam.ly b/input/regression/slur-cross-staff-beam.ly new file mode 100644 index 0000000000..ea9d13df3a --- /dev/null +++ b/input/regression/slur-cross-staff-beam.ly @@ -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 diff --git a/lily/slur.cc b/lily/slur.cc index 22535ef765..c37aa72ad9 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -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 non_sep_extras;