]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-spacing.cc
Docs: NR 3.3.3 Text - better utf8 example
[lilypond.git] / lily / note-spacing.cc
index ffb9d7c40ed28cecf85749e76afbce628c7ab6a2..730a3fe7d747178b8d0d5c7a40279ea825770b86 100644 (file)
 #include "output-def.hh"
 #include "pointer-group-interface.hh"
 
+static bool
+non_empty_barline (Grob *me)
+{
+  return Bar_line::has_interface (me) && !me->extent (me, X_AXIS).is_empty ();
+}
+
 /*
   TODO: detect hshifts due to collisions, and account for them in
   spacing?
@@ -80,7 +86,7 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
     {
       Grob *bar = Pointer_group_interface::find_grob (right_col,
                                                      ly_symbol2scm ("elements"),
-                                                     Bar_line::has_interface);
+                                                     non_empty_barline);
 
       if (bar)
        {
@@ -313,13 +319,12 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
 ADD_INTERFACE (Note_spacing,
               "This object calculates spacing wishes for individual voices.",
 
-              
+              /* properties */
               "knee-spacing-correction "
               "left-items "
               "right-items "
               "same-direction-correction "
               "stem-spacing-correction "
               "space-to-barline "
-
               );