diff options
author | Keith OHara <k-ohara5a5a@oco.net> | 2014-03-08 15:45:20 +0100 |
---|---|---|
committer | Janek WarchoĊ <lemniskata.bernoullego@gmail.com> | 2014-03-08 15:45:20 +0100 |
commit | 34b520c618ed0009f553539bda09093fc154a380 (patch) | |
tree | 4a96a99830d239f4ab72e7cd573c1c142b1ff761 /lily/simple-spacer.cc | |
parent | 553729eb5bb74cc8b45b2ff0bdce181ff72926bf (diff) |
Fix issue 3868: line-breaking makes short lines
Two simple fixes:
1) Always have some stretchability between notes
2) If there _is_ a completely unstretchable line, shorter than the line-width,
score it as a bad fit, not as a perfect fit (report large forces for stiff lines).
Either one would fix the problem; both seem to be good to have in the code.
Diffstat (limited to 'lily/simple-spacer.cc')
-rw-r--r-- | lily/simple-spacer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index f3aee71997..2eb545756f 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -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_; |