- if ((!par || !Axis_group_interface::has_interface (par))
- && ! elts_[i]->empty_b (Y_AXIS))
- add_element (elts_[i]);
+ if (!par || !Axis_group_interface::has_interface (par))
+ if (elts_[i]->is_empty (Y_AXIS))
+ {
+ /*
+ We have to do _something_, otherwise staff objects will
+ end up with System as parent.
+
+ */
+ elts_[i]->set_parent (staffline_, Y_AXIS);
+ }
+ else
+ add_element (elts_[i]);