]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-spacing.cc
Release: update news.
[lilypond.git] / lily / note-spacing.cc
index 5cffd5d2053333df09d6782217b10fff2eeb929a..1d0d21fbbb502e5ae977c0e90781cfe63233aca2 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2001--2011  Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2001--2012  Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -79,7 +79,7 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
     adjust things so there are no collisions.
   */
   Drul_array<Skyline> skys = Spacing_interface::skylines (me, right_col);
-  Real distance = skys[LEFT].distance (skys[RIGHT]);
+  Real distance = skys[LEFT].distance (skys[RIGHT], robust_scm2double (right_col->get_property ("skyline-vertical-padding"), 0.0));
   Real min_dist = max (0.0, distance);
   Real min_desired_space = left_head_end + (min_dist - left_head_end + base_space - increment) / 2;
   Real ideal = base_space - increment + left_head_end;
@@ -222,8 +222,6 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
   Interval bar_xextent;
   Interval bar_yextent;
 
-  Direction d = LEFT;
-
   bool acc_right = false;
 
   Grob *bar = Spacing_interface::extremal_break_aligned_grob (me, RIGHT,
@@ -232,7 +230,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
   if (bar && dynamic_cast<Item *> (bar)->get_column () == rcolumn)
     bar_yextent = Staff_spacing::bar_y_positions (bar);
 
-  do
+  for (LEFT_and_RIGHT (d))
     {
       vector<Grob *> const &items (ly_scm2link_array (props [d]));
       for (vsize i = 0; i < items.size (); i++)
@@ -280,7 +278,6 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
             }
         }
     }
-  while (flip (&d) != LEFT);
 
   Real correction = 0.0;