Spanner *me = unsmob_spanner (grob);
Grob *commonx = 0;
vector<Beam_segment> segments = get_beam_segments (me, &commonx);
+ if (!segments.size ())
+ return SCM_EOL;
Interval span;
if (normal_stem_count (me))
}
Direction dir = get_grob_direction (me);
- Real y = head_positions[dir]
+
+ if (!dir)
+ programming_error ("The beam should have a direction by now.");
+
+ Real y = head_positions.linear_combination (dir)
* 0.5 * Staff_symbol_referencer::staff_space (me)
+ dir * get_beam_translation (me) * (multiplicity.length () + 1);
if (!covered[i]->is_live())
continue;
- // TODO - use this logic in is_cross_staff.
- if (is_cross_staff (me)
- && Align_interface::has_interface (common_refpoint_of_array (stems, me, Y_AXIS)))
- continue;
-
if (Beam::has_interface (covered[i]) && is_cross_staff (covered[i]))
continue;
else
{
// We are completely screwed.
- warning (_ ("no viable initial configuration found: may not find good beam slope"));
+ me->warning (_ ("no viable initial configuration found: may not find good beam slope"));
}
pos = Drul_array<Real> (beam_left_y, (beam_left_y + beam_dy));