]> git.donarmstrong.com Git - lilypond.git/commitdiff
Guesstimate stem end position for bar-stem optical correction.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 8 Jan 2007 08:17:13 +0000 (09:17 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 8 Jan 2007 08:17:13 +0000 (09:17 +0100)
lily/staff-spacing.cc

index c7023db3aa436bd59a234758620e0c7670438d30..65c565617c428aa09531fd94bb7cc141787e0576 100644 (file)
@@ -87,8 +87,15 @@ Staff_spacing::next_note_correction (Grob *me,
       Direction d = get_grob_direction (stem);
       if (Stem::is_normal_stem (stem) && d == DOWN)
        {
-         Real stem_start = Stem::head_positions (stem) [DOWN];
-         Real stem_end = Stem::stem_end_position (stem);
+
+         /*
+           can't look at stem-end-position, since that triggers
+           beam slope computations.
+         */
+         Real stem_start = Stem::head_positions (stem) [d];
+         Real stem_end = stem_start + 
+           d * robust_scm2double (stem->get_property ("length"), 7);
+         
          Interval stem_posns (min (stem_start, stem_end),
                               max (stem_end, stem_start));