From: Han-Wen Nienhuys Date: Wed, 20 Dec 2006 02:24:07 +0000 (+0100) Subject: Always insert bar-line moments, but set grace part to 0 first. Fixes #56. X-Git-Tag: release/2.10.4-1~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=68337a71e663daaa0326b53d48afe6e52939d4a0;p=lilypond.git Always insert bar-line moments, but set grace part to 0 first. Fixes #56. --- diff --git a/input/regression/grace-partial.ly b/input/regression/grace-partial.ly new file mode 100644 index 0000000000..56ed37e8c7 --- /dev/null +++ b/input/regression/grace-partial.ly @@ -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 } +} diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index f98ac23c2f..96460ec2d2 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -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); + } } }