From: Han-Wen Nienhuys Date: Mon, 1 Jan 2007 17:52:37 +0000 (+0100) Subject: Fix #192. X-Git-Tag: release/2.10.7-1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c6fa1f3698353ad146036310d975c4b4618d7375;p=lilypond.git Fix #192. Store separation-item in tie, and use that iso. bound when broken. Conflicts: lily/tie-formatting-problem.cc lily/tie.cc --- 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 4dada25d22..fa72e3f18a 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -202,7 +202,7 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, Y_AXIS, -dir); } while (flip (&updowndir) != DOWN); - + head_extents_[key].set_empty (); for (vsize i = 0; i < head_boxes.size (); i++) { @@ -276,7 +276,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 1263237688..bbda8722f1 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -302,12 +302,16 @@ ADD_INTERFACE (Tie, "dash-period " "details " "direction " + "separation-item " + "head-direction " "line-thickness " "quant-score " "staff-position " "thickness " + ); + diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index dddcef9aee..779f6e45ff 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -484,6 +484,7 @@ useful clues. ") (note-heads ,ly:grob-array? "List of note head grobs") (note-head ,ly:grob? "A single note head") + (separation-item ,ly:grob? "A separation item.") (side-support-elements ,ly:grob-array? "the support, a list of grobs.") (spacing-wishes ,ly:grob-array? "List of note spacing or staff spacing objects.") (stems ,ly:grob-array? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")