+ vector<Interval> extents;
+ vector<bool> make_span_bar;
+ Grob *model_bar = 0;
+ for (vsize i = elements.size (); i--;)
+ {
+ Grob *bar = elements[i];
+ Interval ext = Bar_line::bar_y_extent (bar, refp);
+ if (ext.is_empty ())
+ continue;
+
+ extents.push_back (ext);
+ make_span_bar.push_back (to_boolean (bar->get_property ("allow-span-bar")));
+ model_bar = bar;
+ }
+
+ if (!model_bar)
+ model_bar = me;
+
+ vector_sort (extents, Interval::left_less);