]> git.donarmstrong.com Git - lilypond.git/commitdiff
(start_translation_timestep): backport of 1.7 grace + mmrest fix.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 15 May 2003 22:58:59 +0000 (22:58 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 15 May 2003 22:58:59 +0000 (22:58 +0000)
ChangeLog
lily/multi-measure-rest-engraver.cc

index 15b86e5b830d167f99f3339c15d008c2ce674b2b..c8ffe77c185d3fb4e944594ca60882145bb9cb5b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-16  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/multi-measure-rest-engraver.cc
+       (start_translation_timestep): backport of 1.7 grace + mmrest fix. 
+
 2003-04-29  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * GNUmakefile.in (SUBDIRS): midi2ly.1 build fix backport: build
index 23c0c0007a9d57a26bc19e190dd550cce559535c..ea3f3964a38e3bfd7ddc7b9c75bd1e1cc6ea6784 100644 (file)
@@ -37,7 +37,7 @@ private:
   Span_req * stop_req_;
   int start_measure_;
   Moment start_moment_;
-  
+  Moment last_main_moment_;  
   Spanner *mmrest_;
   Spanner *lastrest_;
 };
@@ -155,8 +155,11 @@ Multi_measure_rest_engraver::start_translation_timestep ()
 {
   SCM smp = get_property ("measurePosition");
   Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  Moment now =now_mom ();
   
-  if (mmrest_ && !mp.to_bool ())
+  if (mmrest_ 
+      && now.main_part_ != last_main_moment_
+      && mp.main_part_ == Rational (0))
     {
       lastrest_ = mmrest_;
       int cur = gh_scm2int (get_property ("currentBarNumber"));
@@ -164,6 +167,8 @@ Multi_measure_rest_engraver::start_translation_timestep ()
                                     gh_int2scm (cur - start_measure_));
       mmrest_ = 0;
     }
+
+  last_main_moment_ = now.main_part_;
 }