- ( (Note_column*)this)->sort();
- return Interval_t<int> ( head_l_arr_[0]->position_i_,
- head_l_arr_.top()->position_i_);
+ bool both = false;
+ if (Rest::has_interface (h))
+ {
+ if (ly_c_pair_p (me->get_property ("note-heads")))
+ both = true;
+ else
+ me->set_property ("rest", h->self_scm ());
+ }
+ else if (Note_head::has_interface (h))
+ {
+ if (unsmob_grob (me->get_property ("rest")))
+ both = true;
+ Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"),h);
+ }
+
+ if (both)
+ me->warning ("Can't have rests and note heads together on a stem.");
+ else
+ Axis_group_interface::add_element (me, h);
+}