]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-spacing.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / note-spacing.cc
index 2700c12835a990362644667ddf8da5df43c903f2..8586cc5f4cd209d6dd508117795eb587d61600d3 100644 (file)
@@ -306,13 +306,13 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
          stems_drul[d] = stem;
          beams_drul[d] = Stem::get_beam (stem);
 
-         Direction stem_dir = get_grob_direction (stem);
-         if (stem_dirs[d] && stem_dirs[d] != stem_dir)
+         Direction sd = get_grob_direction (stem);
+         if (stem_dirs[d] && stem_dirs[d] != sd)
            {
              correct_stem_dirs = false;
              continue;
            }
-         stem_dirs[d] = stem_dir;
+         stem_dirs[d] = sd;
 
          /*
            Correction doesn't seem appropriate  when there is a large flag
@@ -323,20 +323,12 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
            correct_stem_dirs = false;
 
          Interval hp = Stem::head_positions (stem);
-         if (correct_stem_dirs
-             && !hp.is_empty ())
+         if (!hp.is_empty ())
            {
-             Real chord_start = hp[stem_dir];
+             Real chord_start = hp[sd];
+             Real stem_end = Stem::stem_end_position (stem);
 
-             /*
-               can't look at stem-end-position, since that triggers
-               beam slope computations.
-             */
-             Real stem_end = hp[stem_dir] +
-               stem_dir * robust_scm2double (stem->get_property ("length"), 7);
-
-             stem_posns[d] = Interval (min (chord_start, stem_end),
-                                       max (chord_start, stem_end));
+             stem_posns[d] = Interval (min (chord_start, stem_end), max (chord_start, stem_end));
              head_posns[d].unite (hp);
            }
        }
@@ -457,13 +449,5 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
 
 ADD_INTERFACE (Note_spacing, "note-spacing-interface",
               "This object calculates spacing wishes for individual voices.",
-
-              
-              "knee-spacing-correction "
-              "left-items "
-              "right-items "
-              "same-direction-correction "
-              "stem-spacing-correction "
-
-              );
+              "left-items right-items stem-spacing-correction same-direction-correction knee-spacing-correction");