From 61c60c408b78992e56b906b9d1f01c0f15cefce5 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 1 Jan 2007 18:48:08 +0100 Subject: [PATCH] Fix #192. Store separation-item in tie, and use that iso. bound when broken. --- input/regression/tie-broken-other-staff.ly | 15 +++++++++++++++ lily/tie-engraver.cc | 9 +++++++-- lily/tie-formatting-problem.cc | 10 +++++++++- lily/tie.cc | 3 +++ 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 input/regression/tie-broken-other-staff.ly diff --git a/input/regression/tie-broken-other-staff.ly b/input/regression/tie-broken-other-staff.ly new file mode 100644 index 0000000000..0bfca6aa52 --- /dev/null +++ b/input/regression/tie-broken-other-staff.ly @@ -0,0 +1,15 @@ +\header { + texidoc = "Broken tie lengths are not affected by clefs +in other staves." +} + +\version "2.10.0" + +\layout { + ragged-right = ##t +} + +<< + \new Staff \relative c'''{ e1 ~ \break e } + \new Staff \relative c{ \clef bass a \clef treble cis } +>> diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index af3c5a4ad6..243b14b43f 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -181,9 +181,14 @@ Tie_engraver::stop_translation_timestep () if (!wait) heads_to_tie_.clear (); + Grob *sep = unsmob_grob (get_property ("breakableSeparationItem")); for (vsize i = 0; i < ties_.size (); i++) - typeset_tie (ties_[i]); - + { + if (sep) + ties_[i]->set_object ("separation-item", sep->self_scm ()); + + typeset_tie (ties_[i]); + } ties_.clear (); tie_column_ = 0; } diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index 527091267f..d9d58cec70 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -180,6 +180,7 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, if (bounds[0]->break_status_dir ()) { Real x = robust_relative_extent (bounds[0], x_refpoint_, X_AXIS)[-dir]; + chord_outlines_[key].set_minimum_height (x); } else @@ -266,7 +267,14 @@ Tie_formatting_problem::from_ties (vector const &ties) for (vsize i = 0; i < ties.size (); i++) { Item *it = dynamic_cast (ties[i])->get_bound (d); - + if (it->break_status_dir ()) + { + Item *sep + = dynamic_cast (unsmob_grob (ties[i]->get_object ("separation-item"))); + if (sep && sep->get_column () == it->get_column ()) + it = sep; + } + bounds.push_back (it); } diff --git a/lily/tie.cc b/lily/tie.cc index 73041c6a83..50519bc4f5 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -300,13 +300,16 @@ ADD_INTERFACE (Tie, "dash-period " "details " "direction " + "separation-item " "head-direction " "line-thickness " "quant-score " "staff-position " "thickness " + ); + -- 2.39.5