- lastrest_ = mmrest_;
- int cur = gh_scm2int (get_property ("currentBarNumber"));
- lastrest_->set_grob_property ("measure-count",
- gh_int2scm (cur - start_measure_));
+ rest_ev_ = 0;
+ }
+
+ bar_seen_ = false;
+
+ Moment mp (robust_scm2moment (get_property ("measurePosition"), Moment (0)));
+
+ Moment now = now_mom ();
+ if (mmrest_
+ && now.main_part_ != last_main_moment_
+ && mp.main_part_ == Rational (0))
+ {
+ last_rest_ = mmrest_;
+ last_numbers_ = numbers_;
+
+ int cur = scm_to_int (get_property ("currentBarNumber"));
+ int num = cur - start_measure_;
+
+ /*
+ We can't plug a markup directly into the grob, since the
+ measure-count determines the formatting of the mmrest.
+ */
+ last_rest_->set_property ("measure-count", scm_int2num (num));
+
+ SCM sml = get_property ("measureLength");
+ Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1);
+ if (ml >= Rational (2))
+ {
+ last_rest_->set_property ("use-breve-rest", SCM_BOOL_T);
+ }
+