]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/percent-repeat-engraver.cc
* lily/tuplet-bracket.cc (calc_positions): multiply with
[lilypond.git] / lily / percent-repeat-engraver.cc
index 51213abcda40891bbc284c9ef584c25013b0490d..112d1668fbb5dc7a505fe88dc61cc4671b0302be 100644 (file)
@@ -3,21 +3,22 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 
 #include "score-engraver.hh"
 
-#include "repeated-music.hh"
+#include "bar-line.hh"
 #include "global-context.hh"
-#include "warn.hh"
-#include "misc.hh"
-#include "spanner.hh"
+#include "international.hh"
 #include "item.hh"
+#include "misc.hh"
 #include "percent-repeat-iterator.hh"
-#include "bar-line.hh"
+#include "repeated-music.hh"
 #include "side-position-interface.hh"
+#include "spanner.hh"
+#include "warn.hh"
 
 #include "translator.icc"
 
@@ -107,11 +108,8 @@ Percent_repeat_engraver::try_music (Music *m)
       else if (Moment (2) * meas_len == body_length_)
        repeat_sign_type_ = DOUBLE_MEASURE;
       else
-       {
-         warning (_f ("can't handle a percent repeat of length: %s",
-                      body_length_.to_string ()));
-         return false;
-       }
+       return false;
+    
 
       repeat_ = m;
 
@@ -139,7 +137,7 @@ Percent_repeat_engraver::try_music (Music *m)
 void
 Percent_repeat_engraver::process_music ()
 {
-  if (repeat_ && now_mom () == next_moment_)
+  if (repeat_ && now_mom ().main_part_ == next_moment_.main_part_)
     {
       count_ ++; 
       if (repeat_sign_type_ == MEASURE)
@@ -159,7 +157,6 @@ Percent_repeat_engraver::process_music ()
              percent_counter_
                = make_spanner ("PercentRepeatCounter", repeat_->self_scm ());
 
-
              SCM text = scm_number_to_string (scm_from_int (count_),
                                               scm_from_int (10));
              percent_counter_->set_property ("text", text);
@@ -199,6 +196,7 @@ Percent_repeat_engraver::process_music ()
          get_score_engraver ()->forbid_breaks ();
        }
       next_moment_ = next_moment_ + body_length_;
+      next_moment_.grace_part_ = Rational (0);
     }
 }
 
@@ -237,7 +235,7 @@ Percent_repeat_engraver::typeset_perc ()
 void
 Percent_repeat_engraver::start_translation_timestep ()
 {
-  if (stop_mom_ == now_mom ())
+  if (stop_mom_.main_part_ == now_mom ().main_part_)
     {
       if (percent_)
        {