{
if (extremes_[d].note_column_)
{
- end_ys[d] = dir_
- * max (max (dir_ * (base_attachments_[d][Y_AXIS]
- + parameters_.region_size_ * dir_),
- dir_ * (dir_ + extremes_[d].note_column_->extent (common_[Y_AXIS], Y_AXIS)[dir_])),
- dir_ * base_attachments_[-d][Y_AXIS]);
+ Interval nc_extent = extremes_[d].note_column_
+ ->extent (common_[Y_AXIS], Y_AXIS);
+ if (nc_extent.is_empty ())
+ slur_->warning ("slur trying to encompass an empty note column.");
+ else
+ end_ys[d] = dir_
+ * max (max (dir_ * (base_attachments_[d][Y_AXIS]
+ + parameters_.region_size_ * dir_),
+ dir_ * (dir_ + nc_extent[dir_])),
+ dir_ * base_attachments_[-d][Y_AXIS]);
}
else
end_ys[d] = base_attachments_[d][Y_AXIS] + parameters_.region_size_ * dir_;
bool
Stem::is_invisible (Grob *me)
{
- return !is_normal_stem (me)
- && (robust_scm2double (me->get_property ("stemlet-length"),
- 0.0) == 0.0);
+ if (is_normal_stem (me))
+ return false;
+ else if (head_count (me))
+ return true;
+ else // if there are no note-heads, we might want stemlets
+ return 0.0 == robust_scm2double (me->get_property ("stemlet-length"), 0.0);
}
bool
if (!lh && !beam)
return false;
- if (lh && robust_scm2int (lh->get_property ("duration-log"), 0) < 1)
- return false;
-
if (is_invisible (me))
return false;