On the cross-compiled windows executable, head_positions().is_empty()
seems to sometimes return true for a stem with a single note.
head_positions() returns something like [3.00... , 3.00...]
{
Grob *stem = stems[i];
- Interval head_extents = Stem::head_positions (stem);
- if (!head_extents.is_empty ())
+ Interval head_extents;
+ if (Stem::head_count (stem))
{
- head_extents[LEFT] += -1;
- head_extents[RIGHT] += 1;
+ head_extents = Stem::head_positions (stem);
+ head_extents.widen (1);
head_extents *= staff_space * 0.5;
/*
Real
Stem::chord_start_y (Grob *me)
{
- Interval hp = head_positions (me);
- if (!hp.is_empty ())
- return hp[get_grob_direction (me)] * Staff_symbol_referencer::staff_space (me)
- * 0.5;
+ if (head_count (me))
+ return Staff_symbol_referencer::get_position (last_head (me))
+ * Staff_symbol_referencer::staff_space (me) * 0.5;
+
return 0;
}
Direction dir = CENTER;
int staff_center = 0;
- Interval hp = head_positions (me);
- if (!hp.is_empty ())
+ if (head_count (me))
{
+ Interval hp = head_positions (me);
int udistance = (int) (UP * hp[UP] - staff_center);
int ddistance = (int) (DOWN * hp[DOWN] - staff_center);