From 8acad65978d6a5efc174b07d61147028a0c1d3a6 Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Thu, 17 May 2012 08:03:04 +0200 Subject: [PATCH] Prohibit Hairpins from colliding with Arpeggios --- input/regression/hairpin-arpeggio.ly | 14 ++++++++++++++ lily/hairpin.cc | 4 +--- lily/lyric-hyphen.cc | 4 +--- lily/tuplet-bracket.cc | 5 ++--- 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 input/regression/hairpin-arpeggio.ly diff --git a/input/regression/hairpin-arpeggio.ly b/input/regression/hairpin-arpeggio.ly new file mode 100644 index 0000000000..25a16ac595 --- /dev/null +++ b/input/regression/hairpin-arpeggio.ly @@ -0,0 +1,14 @@ +\version "2.15.37" + +\header { + texidoc = "Hairpins in @code{Dynamics} contexts do not collide with +arpeggios. +" +} + +\new PianoStaff<< + \set PianoStaff.connectArpeggios = ##t + { c''\arpeggio c'' } + \new Dynamics { s\< s\! } + { c'\arpeggio c'' } +>> diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 7639ddd78e..adaa201593 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -159,9 +159,7 @@ Hairpin::print (SCM smob) for (LEFT_and_RIGHT (d)) { Item *b = bounds[d]; - Interval e = (Paper_column::has_interface (b) && b->break_status_dir ()) - ? Axis_group_interface::generic_bound_extent (b, common, X_AXIS) - : robust_relative_extent (b, common, X_AXIS); + Interval e = Axis_group_interface::generic_bound_extent (b, common, X_AXIS); x_points[d] = b->relative_coordinate (common, X_AXIS); if (broken [d]) diff --git a/lily/lyric-hyphen.cc b/lily/lyric-hyphen.cc index 21ec770ea1..0e3a67e348 100644 --- a/lily/lyric-hyphen.cc +++ b/lily/lyric-hyphen.cc @@ -49,9 +49,7 @@ Lyric_hyphen::print (SCM smob) Interval span_points; for (LEFT_and_RIGHT (d)) { - Interval iv = bounds[d]->break_status_dir () - ? Axis_group_interface::generic_bound_extent (bounds[d], common, X_AXIS) - : robust_relative_extent (bounds[d], common, X_AXIS); + Interval iv = Axis_group_interface::generic_bound_extent (bounds[d], common, X_AXIS); span_points[d] = iv.is_empty () ? bounds[d]->relative_coordinate (common, X_AXIS) diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 643d07ae67..d566027d2a 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -199,9 +199,8 @@ Tuplet_bracket::calc_x_positions (SCM smob) Interval x_span; for (LEFT_and_RIGHT (d)) { - x_span[d] = bounds[d]->break_status_dir () - ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[d] - : robust_relative_extent (bounds[d], commonx, X_AXIS)[d]; + x_span[d] = Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[d]; + if (connect_to_other[d]) { Interval overshoot (robust_scm2drul (me->get_property ("break-overshoot"), -- 2.39.2