From 1cb67d08dde05a8ebfdd078eee4f51ebd50435d0 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 20 Dec 2006 03:24:07 +0100 Subject: [PATCH] Always insert bar-line moments, but set grace part to 0 first. Fixes #56. --- input/regression/grace-partial.ly | 13 +++++++++++++ lily/timing-translator.cc | 13 ++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 input/regression/grace-partial.ly 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); + } } } -- 2.39.5