/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2009--2011 Joe Neeman <joeneeman@gmail.com>
+ Copyright (C) 2009--2012 Joe Neeman <joeneeman@gmail.com>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
: bottom_skyline_ (DOWN)
{
Prob *page = unsmob_prob (page_scm);
+ bottom_loose_baseline_ = 0;
header_height_ = 0;
footer_height_ = 0;
header_padding_ = 0;
{
if (is_spaceable (elts[i]))
{
- // We don't add a spring for the first staff, since
- // we are only adding springs _between_ staves here.
if (!found_spaceable_staff)
{
+ // Ensure space for any loose lines above this system
+ if (i > 0)
+ springs_.back ().ensure_min_distance (bottom_loose_baseline_
+ - minimum_offsets_with_min_dist[i]
+ + padding);
found_spaceable_staff = true;
last_spaceable_staff = i;
+ // We don't add a spring for the first staff, since
+ // we are only adding springs _between_ staves here.
continue;
}
}
}
+ bottom_loose_baseline_ = found_spaceable_staff
+ ? ( minimum_offsets_with_min_dist[last_spaceable_staff]
+ - minimum_offsets_with_min_dist.back ())
+ : 0;
+
// Corner case: there was only one staff, and it wasn't spaceable.
// Mark it spaceable, because we do not allow non-spaceable staves
// to be at the top or bottom of a system.