+ SCM characteristic = head_characteristic (rests[0]);
+ int i = 1;
+ for (; i < rests.size (); i++)
+ {
+ if (!gh_equal_p (head_characteristic (rests[i]), characteristic))
+ break;
+ }
+
+ /*
+ If all durations are the same, we'll check if there are more
+ rests than maximum-rest-count.
+ Otherwise (different durations), we'll try to display them all
+ (urg: all 3 of them, currently).
+ */
+ int display_count;
+ SCM s = me->get_grob_property ("maximum-rest-count");
+ if (i == rests.size ()
+ && gh_number_p (s) && gh_scm2int (s) < rests.size ())
+ {
+ display_count = gh_scm2int (s);
+ for (; i > display_count; i--)
+ {
+ Grob* r = unsmob_grob (rests[i-1]->get_grob_property ("rest"));
+ if (r)
+ r->suicide ();
+ rests[i-1]->suicide ();
+ }
+ }
+ else
+ display_count = rests.size ();
+
+ /*
+ Ugh. Should have minimum dist.
+
+ Ugh. What do we do if we have three different rests?