]> git.donarmstrong.com Git - lilypond.git/commitdiff
Use between-system-padding as a default for
authorJoe Neeman <joeneeman@gmail.com>
Sun, 14 Jan 2007 11:02:36 +0000 (13:02 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Sun, 14 Jan 2007 11:02:36 +0000 (13:02 +0200)
page-breaking-between-system-padding.

lily/constrained-breaking.cc
scm/layout-page-layout.scm

index 1a03c6b32402b6adcdcf51c04b6094f5c950d529..08ec2934ebcc6db82a77a0997b7c52fb7d9869d2 100644 (file)
@@ -322,8 +322,11 @@ Constrained_breaking::initialize ()
       
   Output_def *l = pscore_->layout ();
   System *sys = pscore_->root_system ();
-  Real padding = robust_scm2double (l->c_variable ("page-breaking-between-system-padding"), 0);
   Real space = robust_scm2double (l->c_variable ("ideal-system-space"), 0);
+  SCM padding_scm = l->c_variable ("page-breaking-between-system-padding");
+  if (!scm_is_number (padding_scm))
+    padding_scm = l->c_variable ("between-system-padding");
+  Real padding = robust_scm2double (padding_scm, 0.0);
 
   Interval first_line = line_dimensions_int (pscore_->layout (), 0);
   Interval other_lines = line_dimensions_int (pscore_->layout (), 1);
index 9e8971ac7e1df569cdc158305169c777334e71ed..d2d06b0331387bfc4d293c64027b373cb42b0260 100644 (file)
                                            page lines paper))
                           (spacing (space-systems space-to-fill lines ragged paper #f)))
                      (if (or (not (car spacing)) (inf? (car spacing)))
-                         (cdr (space-systems space-to-fill lines ragged paper #t))
+                         (begin
+                           (ly:warning (_ "Can't fit systems on page -- ignoring between-system-padding"))
+                           (cdr (space-systems space-to-fill lines ragged paper #t)))
                          (cdr spacing))))))
     (page-set-property! page 'configuration posns)
     page))