]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3375: Fix accounting problem in page breaking
authorDavid Kastrup <dak@gnu.org>
Thu, 23 May 2013 20:03:10 +0000 (22:03 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 24 May 2013 14:03:36 +0000 (16:03 +0200)
The code

\markup \stencil #(ly:make-stencil '() empty-interval empty-interval)
\markup *
\markup *
\markup *
\markup *

distributed itself across 5 pages because page accounting was thrown
off by empty intervals.  While the effects were smaller (and did not
propagate to the next page) with the less radically empty intervals
employed as extents of empty-stencil, they were still present.

lily/constrained-breaking.cc

index ee8b28906c5f6d476e82b49cb3afeba92974b833..8d3b6967e42a05f37e308e6926a3d532b6c729b7 100644 (file)
@@ -571,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 () ? 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;