]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #192.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 1 Jan 2007 17:48:08 +0000 (18:48 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 1 Jan 2007 17:48:08 +0000 (18:48 +0100)
Store separation-item in tie, and use that iso. bound when broken.

input/regression/tie-broken-other-staff.ly [new file with mode: 0644]
lily/tie-engraver.cc
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 (file)
index 0000000..0bfca6a
--- /dev/null
@@ -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 }
+>>
index af3c5a4ad647f89fafee53b0e2bada63d786c061..243b14b43f86dad60776736f2006d89fb308e69e 100644 (file)
@@ -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;
     }
index 527091267f9d2bbf31bb9568af3a948b81a4fd8f..d9d58cec70baa673fb738fff12573c0e662f44ee 100644 (file)
@@ -180,6 +180,7 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> 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<Grob*> const &ties)
       for (vsize i = 0; i < ties.size (); i++)
        {
          Item *it = dynamic_cast<Spanner*> (ties[i])->get_bound (d);
-                                            
+         if (it->break_status_dir ())
+           {
+             Item *sep
+               = dynamic_cast<Item*> (unsmob_grob (ties[i]->get_object ("separation-item")));
+             if (sep && sep->get_column () == it->get_column ())
+               it = sep;
+           }
+         
          bounds.push_back (it);
        }
       
index 73041c6a837f6fdb7482f14b02a7c65f57ae9a08..50519bc4f55ab4ae5da1f4e25a59e593d2c4d7a3 100644 (file)
@@ -300,13 +300,16 @@ ADD_INTERFACE (Tie,
               "dash-period "
               "details "
               "direction "
+              "separation-item "
               "head-direction "
               "line-thickness " 
               "quant-score "
               "staff-position "
               "thickness "
+
               );
 
 
 
 
+