]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/simple-spacer.cc
Merge remote-tracking branch 'origin/translation'
[lilypond.git] / lily / simple-spacer.cc
index 61afdb9bcc281004c4b0dbffbabe2fbd757ec4d5..2eb545756fd5538f20ce5a47e44c1c7582af3017 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1999--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1999--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   TODO:
   - add support for different stretch/shrink constants?
@@ -193,7 +193,7 @@ Simple_spacer::expand_line ()
     inv_hooke += springs_[i].inverse_stretch_strength ();
 
   if (inv_hooke == 0.0) /* avoid division by zero. If springs are infinitely stiff */
-    return 0.0;         /* anyway, then it makes no difference what the force is */
+    inv_hooke = 1e-6;   /* then report a very large stretching force */
 
   assert (cur_len <= line_len_);
   return (line_len_ - cur_len) / inv_hooke + force_;
@@ -387,6 +387,9 @@ get_column_description (vector<Grob *> const &cols, vsize col_index, bool line_s
           if (cols[j] == other)
             description.rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
           else /* it must end at the LEFT prebroken_piece */
+               /* see Spanner::set_spacing_rods for more comments on how
+                  to deal with situations where  we don't know if we're
+                  ending yet on the left prebroken piece */
             description.end_rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
         }
     }