]> git.donarmstrong.com Git - lilypond.git/commitdiff
Always insert bar-line moments, but set grace part to 0 first. Fixes #56.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 20 Dec 2006 02:24:07 +0000 (03:24 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 20 Dec 2006 02:24:07 +0000 (03:24 +0100)
input/regression/grace-partial.ly [new file with mode: 0644]
lily/timing-translator.cc

diff --git a/input/regression/grace-partial.ly b/input/regression/grace-partial.ly
new file mode 100644 (file)
index 0000000..56ed37e
--- /dev/null
@@ -0,0 +1,13 @@
+
+\version "2.10.4"
+
+\header {
+
+  texidoc = "A @code{\\partial} may be combined with a
+  @code{\\grace}."
+
+}
+
+\score {
+  { \partial 4 \grace b8 b4 b1 }
+}
index f98ac23c2fc1af222789727a764559ca8c661ffa..96460ec2d29dd84afd8dd41a28d3509bb3ebfa3c 100644 (file)
@@ -25,13 +25,12 @@ Timing_translator::stop_translation_timestep ()
       Moment barleft = (measure_length () - measure_position (context ()));
       Moment now = now_mom ();
 
-      if (barleft > Moment (0)
-         /*
-           Hmm. We insert the bar moment every time we process a
-           moment.  A waste of cpu?
-         */
-         && !now.grace_part_)
-       global->add_moment_to_process (now + barleft);
+      if (barleft > Moment (0))
+       {
+         Moment nextmom = now + barleft;
+         nextmom.grace_part_ = Rational (0);
+         global->add_moment_to_process (nextmom);
+       }
     }
 }