]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spacing-determine-loose-columns.cc
Doc-de: updates from master
[lilypond.git] / lily / spacing-determine-loose-columns.cc
index 90db1e01e192a82b341a79694b2d2df01cd4d6b8..5a2411b3226a04bdb8450eaee9d17c8e7b4acf00 100644 (file)
@@ -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 <hanwen@xs4all.nl>
 
-  (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  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 <http://www.gnu.org/licenses/>.
 */
 
 #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)
        {