- vector<Grob*> const &items (ly_scm2link_array (props [d]));
- for (vsize i = items.size (); i--;)
- {
- Item *it = dynamic_cast<Item *> (items[i]);
-
- if (d == RIGHT && it->break_status_dir () != col_dir)
- it = it->find_prebroken_piece (col_dir);
-
- /*
- some kind of mismatch, eg. a note column, that is behind a
- linebreak.
- */
- if (!it)
- continue;
-
- Item *it_col = it->get_column ();
- if (d == RIGHT && right_col != it_col)
- continue;
-
- if (Separation_item::has_interface (it))
- {
- extents[d].unite (Separation_item::width (it));
- continue;
- }
-
- if (d == LEFT)
- {
- SCM r = it->get_object ("rest");
- Grob *g = unsmob_grob (r);
- if (!g)
- g = Note_column::first_head (it);
-
- /*
- Ugh. If Stem is switched off, we don't know what the
- first note head will be.
- */
- if (g)
- {
- if (g->common_refpoint (it_col, X_AXIS) != it_col)
- programming_error ("Note_spacing::get_spacing(): Common refpoint incorrect");
- else
- left_head_wid = g->extent (it_col, X_AXIS);
- }
- }
-
- extents[d].unite (it->extent (it_col, X_AXIS));
- if (d == RIGHT)
- {
- Grob *accs = Note_column::accidentals (it);
- if (!accs)
- accs = Note_column::accidentals (it->get_parent (X_AXIS));
-
- if (accs)
- {
- Interval v
- = Accidental_placement::get_relevant_accidental_extent (accs, it_col, me);
-
- extents[d].unite (v);
- }
-
- if (Grob *arpeggio = Note_column::arpeggio (it))
- extents[d].unite (arpeggio->extent (it_col, X_AXIS));
- }
- }
-
- if (extents[d].is_empty ())
- extents[d] = Interval (0, 0);
+ SCM r = note_columns[i]->get_object ("rest");
+ Grob *g = unsmob_grob (r);
+ Grob *col = note_columns[i]->get_column ();
+
+ if (!g)
+ g = Note_column::first_head (note_columns[i]);
+
+ /*
+ Ugh. If Stem is switched off, we don't know what the
+ first note head will be.
+ */
+ if (g)
+ {
+ if (g->common_refpoint (col, X_AXIS) != col)
+ programming_error ("Note_spacing::get_spacing (): Common refpoint incorrect");
+ else
+ left_head_end = g->extent (col, X_AXIS)[RIGHT];
+ }