]> git.donarmstrong.com Git - lilypond.git/commitdiff
Use less whitespace at the end of a measure.
authorJoe Neeman <joeneeman@gmail.com>
Tue, 14 Aug 2007 23:16:17 +0000 (09:16 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Tue, 14 Aug 2007 23:16:17 +0000 (09:16 +1000)
lily/note-spacing.cc

index d476f70fa08c617b835ee5181be228db13c9eb84..d19f63e632827d5fd50c2bc4af12c6713440bd09 100644 (file)
@@ -81,13 +81,17 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
                                                      Bar_line::has_interface);
 
       if (bar)
-       ideal -= bar->extent (right_col, X_AXIS)[LEFT];
+       {
+         Real shift = bar->extent (right_col, X_AXIS)[LEFT];
+         ideal -= shift;
+         min_desired_space -= shift;
+       }
     }
 
   ideal = max (ideal, min_desired_space);
   stem_dir_correction (me, right_col, increment, &ideal, &min_desired_space);
 
-  Spring ret (ideal, min_dist);
+  Spring ret (max (0.0, ideal), min_dist);
   ret.set_inverse_compress_strength (max (0.0, ideal - min_desired_space));
   ret.set_inverse_stretch_strength (max (0.1, base_space - increment));
   return ret;