]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-spacing.cc
* The grand 2005-2006 replace.
[lilypond.git] / lily / note-spacing.cc
index 6f264a7135f4eda38d5ff05b58f26396af07fa9a..c04ac2bee34a4a17e9406ba74de72d7b08a5a669 100644 (file)
@@ -3,11 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2001--2005  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2006  Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "note-spacing.hh"
 
+#include "directional-element-interface.hh"
 #include "grob-array.hh"
 #include "paper-column.hh"
 #include "moment.hh"
@@ -136,7 +137,6 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
          */
          + max (0.0, -extents[RIGHT][LEFT] - (base_space - increment))));
 
-
   /*
     We don't do complicated stuff: (base_space - increment) is the
     normal amount of white, which also determines the amount of
@@ -145,9 +145,15 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
   */
   *space = (base_space - increment) + *fixed;
 
+#if 0
+  /*
+    The below situation is now handled by the "sticks out a lot" case
+    above. However we keep around the code for a few releases before
+    we drop it.
+   */
   if (!extents[RIGHT].is_empty ()
       && (Item::is_breakable (right_col)
-         || right_col->original_))
+         || right_col->original ()))
     {
       /*
        This is for the situation
@@ -162,7 +168,8 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
       *space += -extents[RIGHT][LEFT] / 2;
       *fixed += -extents[RIGHT][LEFT] / 2;
     }
-
+#endif
+  
   stem_dir_correction (me, right_col, increment, space, fixed);
 }
 
@@ -220,9 +227,7 @@ Note_spacing::right_column (Grob *me)
     }
 
   if (!mincol)
-    {
-      return 0;
-    }
+    return 0;
 
   return mincol;
 }
@@ -296,7 +301,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
          stems_drul[d] = stem;
          beams_drul[d] = Stem::get_beam (stem);
 
-         Direction sd = Stem::get_direction (stem);
+         Direction sd = get_grob_direction (stem);
          if (stem_dirs[d] && stem_dirs[d] != sd)
            {
              correct_stem_dirs = false;