]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/separating-group-spanner.cc
add type preds.
[lilypond.git] / lily / separating-group-spanner.cc
index fb8cce00226d91ec9171f54cca78be2e907cb2da..7de9341e397868b8f24c812910a37dfef0f60b12 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1998--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "separating-group-spanner.hh"
@@ -13,6 +13,7 @@
 #include "output-def.hh"
 #include "dimensions.hh"
 #include "pointer-group-interface.hh"
+#include "moment.hh"
 
 void
 Separating_group_spanner::find_rods (Item *r,
@@ -37,7 +38,13 @@ Separating_group_spanner::find_rods (Item *r,
          Separation_item::set_distance (Drul_array<Item*> (lb, r), padding);
        }
 
-      if (Separation_item::set_distance (Drul_array<Item *> (l, r), padding))
+      if (Separation_item::set_distance (Drul_array<Item *> (l, r), padding)
+         /*
+           This check is because grace notes are set very tight, and
+           the accidentals of main note may stick out so far to cover
+           a barline preceding the grace note.
+          */
+         && spanned_time_interval (l, r).length ().main_part_ > Rational (0))
        break;
 
       /*