- Item *it = dynamic_cast<Item *> (i.grob ());
- if (!it)
- return;
- if (it->get_parent (X_AXIS)
- && it->get_parent (X_AXIS)
- ->has_extent_callback (Axis_group_interface::group_extent_callback_proc, X_AXIS))
- return;
-
- if (to_boolean (it->get_property ("no-spacing-rods")))
- return;
-
- if (Note_spacing::has_interface (it))
- {
- current_spacings_.note_spacings_.push (it);
- return;
- }
-
- bool ib = Item::is_breakable (it);
- Item *&p_ref_ (ib ? break_item_
- : musical_item_);
-
- if (!p_ref_)
- {
- p_ref_ = make_item ("SeparationItem", SCM_EOL);
-
- if (ib)
- {
- p_ref_->set_property ("breakable", SCM_BOOL_T);
- context ()->set_property ("breakableSeparationItem", p_ref_->self_scm ());
- }
-
- if (to_boolean (get_property ("createSpacing"))
- && p_ref_ == break_item_)
- {
- Item *it = make_item ("StaffSpacing", SCM_EOL);
- current_spacings_.staff_spacing_ = it;
- Pointer_group_interface::add_grob (it, ly_symbol2scm ("left-items"),
- break_item_);
-
- if (int i = last_spacings_.note_spacings_.size ())
- {
- for (; i--;)
- Pointer_group_interface::add_grob (last_spacings_.note_spacings_[i],
- ly_symbol2scm ("right-items"),
- break_item_);
- }
- else if (last_spacings_.staff_spacing_)
- {
- SCM ri = last_spacings_.staff_spacing_->get_object ("right-items");
- Grob_array *ga = unsmob_grob_array (ri);
- if (!ga)
- {
- SCM ga_scm = Grob_array::make_array ();
- last_spacings_.staff_spacing_->set_object ("right-items", ga_scm);
- ga = unsmob_grob_array (ga_scm);
- }
-
- ga->clear ();
- ga->add (break_item_);
- }
- }
- }
-
- if (Accidental_placement::has_interface (it))
- Separation_item::add_conditional_item (p_ref_, it);
- else
- Separation_item::add_item (p_ref_, it);