X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fconstrained-breaking.cc;h=f8d4b0f5b2280d10ca669a1cb1678b3bdd5dc7ab;hb=fe37d3cbc1f095a36e65d8ae6f400465e5aab62d;hp=c8b7fc1d748bc06ae2074d33d436d77ab1bdd2e5;hpb=25e22b5ae7e6c1c5a8ffa82fd8217909ef3fa124;p=lilypond.git diff --git a/lily/constrained-breaking.cc b/lily/constrained-breaking.cc index c8b7fc1d74..f8d4b0f5b2 100644 --- a/lily/constrained-breaking.cc +++ b/lily/constrained-breaking.cc @@ -202,8 +202,10 @@ Constrained_breaking::solve (vsize start, vsize end, vsize sys_count) } } /* if we get to here, just put everything on one line */ - warning (_ ("cannot find line breaking that satisfies constraints")); - ret.push_back (space_line (0, end_brk)); + if (sys_count > 0) { + warning (_ ("cannot find line breaking that satisfies constraints")); + ret.push_back (space_line (0, end_brk)); + } return ret; } @@ -291,9 +293,11 @@ Constrained_breaking::line_details (vsize start, vsize end, vsize sys_count) } /* if we get to here, just put everything on one line */ - Line_details details; - fill_line_details (&details, 0, end_brk); - ret.push_back (details); + if (sys_count > 0) { + Line_details details; + fill_line_details (&details, 0, end_brk); + ret.push_back (details); + } return ret; } @@ -567,7 +571,9 @@ Line_details::Line_details (Prob *pb, Output_def *paper) last_column_ = 0; force_ = 0; - Interval stencil_extent = unsmob_stencil (pb->get_property ("stencil"))->extent (Y_AXIS); + Stencil *st = unsmob_stencil (pb->get_property ("stencil")); + Interval stencil_extent = st->is_empty (Y_AXIS) ? Interval (0, 0) + : st->extent (Y_AXIS); shape_ = Line_shape (stencil_extent, stencil_extent); // pretend it goes all the way across tallness_ = 0; bottom_padding_ = 0;