- for (int i =0; i < elems_.size (); i++)
- {
- Grob * elem = elems_[i];
-
- if (Spanner *s = dynamic_cast <Spanner *> (elem))
- {
- /*
- do something sensible if spanner not
- spanned on 2 items.
- */
- Direction d = LEFT;
- do {
- if (!s->get_bound (d))
- {
- Grob * cc
- = unsmob_grob (get_property ("currentCommandColumn"));
- s->set_bound (d, cc);
- /* don't warn for empty/suicided spanners,
- it makes real warningsinvisible.
- maybe should be junked earlier? */
- if (elem->live ())
- elem->warning (_f ("unbound spanner `%s'", s->name ().to_str0 ()));
- }
- }
- while (flip (&d) != LEFT);
-
- if (dynamic_cast<Item*> (s->get_parent (Y_AXIS)))
- programming_error ("Spanner Y-parent is an item.");
- }
- else
- {
- if (!elem->get_parent (X_AXIS))
- {
- bool br = to_boolean (elem->get_property ("breakable"));
- Axis_group_interface::add_element (br ? command_column_ : musical_column_, elem);
-
- }
- }
- if (!elem->get_parent (Y_AXIS))
- Axis_group_interface::add_element (system_, elem);
- }
- elems_.clear ();
-}