-void
-Rest_collision_engraver::acknowledge_grob (Grob_info i)
-{
- if (Note_column::has_interface (i.grob_l_))
- note_column_l_arr_.push (i.grob_l_);
+ for (SCM s = get_property ("busyGrobs"); scm_is_pair (s); s = scm_cdr (s))
+ {
+ Grob *g = unsmob_grob (scm_cdar (s));
+ Moment *m = unsmob_moment (scm_caar (s));
+ if (!g || !m)
+ continue;
+
+ if (Rhythmic_head::has_interface (g) && (*m) > now)
+ {
+ Grob *column = g->get_parent (X_AXIS);
+ if (!column)
+ {
+ g->warning (_ ("rhythmic head is not part of a rhythmic column"));
+ continue;
+ }
+
+ // Only include rests that start now. Include notes that started any time.
+ Paper_column *paper_column = dynamic_cast<Item *> (column)->get_column ();
+ if (!Rest::has_interface (g) || !paper_column || Paper_column::when_mom (paper_column) == now)
+ {
+ columns.insert (column);
+ rest_count += Note_column::has_rests (column);
+ }
+ }
+ }
+
+ if (!rest_collision_ && rest_count && columns.size () > 1)
+ {
+ rest_collision_ = make_item ("RestCollision", SCM_EOL);
+ for (set<Grob *>::iterator i = columns.begin (); i != columns.end (); ++i)
+ Rest_collision::add_column (rest_collision_, *i);
+ }