]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/constrained-breaking.cc
Fix #229.
[lilypond.git] / lily / constrained-breaking.cc
index b8253ac4e93ce5b0a3970393c29b991938745071..b7eddd6f225fbf060f4a762143b2d2725ff0c79e 100644 (file)
@@ -4,7 +4,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2006 Joe Neeman <joeneeman@gmail.com>
+  (c) 2006--2007 Joe Neeman <joeneeman@gmail.com>
 */
 
 #include "constrained-breaking.hh"
@@ -173,7 +173,7 @@ Constrained_breaking::get_solution (vsize start, vsize end, vsize sys_count)
             {
               if (brk != end_brk)
                 {
-                  warning (_ ("couldn't find line breaking that satisfies constraints" ));
+                  warning (_ ("cannot find line breaking that satisfies constraints" ));
                   ret.push_back (space_line (brk, end_brk));
                 }
               /* build up the good solution */
@@ -190,7 +190,7 @@ Constrained_breaking::get_solution (vsize start, vsize end, vsize sys_count)
         }
     }
   /* if we get to here, just put everything on one line */
-  warning (_ ("couldn't find line breaking that satisfies constraints" ));
+  warning (_ ("cannot find line breaking that satisfies constraints" ));
   ret.push_back (space_line (0, end_brk));
   return ret;
 }
@@ -322,14 +322,14 @@ Constrained_breaking::initialize ()
       
   Output_def *l = pscore_->layout ();
   System *sys = pscore_->root_system ();
-  Real padding = robust_scm2double (l->c_variable ("between-system-padding"), 0);
+  Real padding = robust_scm2double (l->c_variable ("page-breaking-between-system-padding"), 0);
   Real space = robust_scm2double (l->c_variable ("ideal-system-space"), 0);
 
   Interval first_line = line_dimensions_int (pscore_->layout (), 0);
   Interval other_lines = line_dimensions_int (pscore_->layout (), 1);
   /* do all the rod/spring problems */
   breaks_ = pscore_->find_break_indices ();
-  all_ = pscore_->root_system ()->columns ();
+  all_ = pscore_->root_system ()->used_columns ();
   lines_.resize (breaks_.size (), breaks_.size (), Line_details ());
   vector<Real> forces = get_line_forces (all_,
                                         other_lines.length (),
@@ -365,7 +365,7 @@ Constrained_breaking::initialize ()
          line.extent_ = extent;
          line.padding_ = padding;
          line.space_ = space;
-         line.inverse_hooke_ = 1;
+         line.inverse_hooke_ = extent.length () + space;
        }
     }