]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-spacing.cc
* lily/note-spacing.cc (get_spacing): less space at EOL in case of
[lilypond.git] / lily / note-spacing.cc
index 6a8600e7d4932e5156cea292f0a7d4f3c48a17b7..fca28671ee048d73b1f7feecdb438eb630c6281f 100644 (file)
@@ -140,17 +140,22 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
    */
   *space = (base_space - increment) + *fixed ;
 
-  if (Item::breakable_b (right_col)
-      || right_col->original_)
+  if (!extents[RIGHT].is_empty ()
+      && (Item::breakable_b (right_col)
+         || right_col->original_))
     {
       /*
        This is for the situation
 
        rest | 3/4 (eol)
-       
+
+       Since we only take half of the right-object space above, the
+       barline will bump into the notes preceding it, if the right
+       thing is big. We add the rest of the extents here:
        */
-      *space += -extents[RIGHT][LEFT];
-      *fixed += -extents[RIGHT][LEFT];
+      
+      *space += -extents[RIGHT][LEFT] / 2;
+      *fixed += -extents[RIGHT][LEFT] / 2;
     }
   
   stem_dir_correction (me, right_col, increment, space, fixed);