X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fspacing-determine-loose-columns.cc;h=5a2411b3226a04bdb8450eaee9d17c8e7b4acf00;hb=7cd8c1d1e389edc26c26b7eba8358578329f5881;hp=90db1e01e192a82b341a79694b2d2df01cd4d6b8;hpb=eb71b343f91d1fbe1842f653fb285e12934ed072;p=lilypond.git diff --git a/lily/spacing-determine-loose-columns.cc b/lily/spacing-determine-loose-columns.cc index 90db1e01e1..5a2411b322 100644 --- a/lily/spacing-determine-loose-columns.cc +++ b/lily/spacing-determine-loose-columns.cc @@ -1,10 +1,20 @@ /* - spacing-determine-loose-columns.cc -- implement Spacing_spanner - methods that decide which columns to turn loose. + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2009 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "staff-spacing.hh" @@ -200,6 +210,18 @@ Spacing_spanner::prune_loose_columns (Grob *me, loose = false; c->set_property ("maybe-loose", SCM_BOOL_T); } + /* + Unbreakable columns which only contain page-labels also + never get pruned, otherwise the labels are lost before they can + be collected by the System: so we mark these columns too. + */ + if (!loose && !Paper_column::is_breakable (c) + && scm_is_pair (c->get_property ("labels"))) + { + extract_grob_set (c, "elements", elts); + if (elts.empty ()) + c->set_property ("maybe-loose", SCM_BOOL_T); + } if (loose) {