]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/separating-group-spanner.cc
codingstyle nits: space before ( and after ,
[lilypond.git] / lily / separating-group-spanner.cc
index f8975cd5158e5eb62be38f642899c8d3972cc220..7de9341e397868b8f24c812910a37dfef0f60b12 100644 (file)
@@ -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;
 
       /*