]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2462: don't change ideal spacing when adding a rod
authorJanek Warchoł <lemniskata.bernoullego@gmail.com>
Mon, 30 Jun 2014 20:14:16 +0000 (22:14 +0200)
committerJanek Warchoł <lemniskata.bernoullego@gmail.com>
Fri, 11 Jul 2014 06:22:51 +0000 (08:22 +0200)
When objects like lyrics are added to the PaperColumns, LilyPond inserts
rods between these columns to ensure that the objects won't overlap.
However, the ideal distance should remain unchanged.  For example, in

\layout {
  ragged-right = ##f
}
\relative f' { \repeat unfold 8 a4 }
\addlyrics { \repeat unfold 4 la \repeat unfold 4 straight }

notes in 2nd measure have long lyrics attached to them - min_distance_
of the springs between these columns should be adjusted, but distance_
(the ideal distance) should not: it should be the same as for notes
with short lyrics.  When the line is stretched so much that the minimum
distances are not involved, the springs between notes in both measures
should behave (almost) identical.

Note that there are more such problems in the springs code, for example
in merge_springs.  The code should be rewritten, but that's not trivial.
Since this one-liner fixes some instances of the problem without any bad
side-effects, it makes sense to include it separately.

lily/spring.cc

index f4123b9891527abc9c8633c7abe3f48a1c77fd6f..3963ee44529a5c9cc1565372825bb52ad63d41c6 100644 (file)
@@ -189,7 +189,6 @@ Spring::set_blocking_force (Real f)
 
   blocking_force_ = -infinity_f;
   min_distance_ = length (f);
-  distance_ = max (distance_, min_distance_);
   update_blocking_force ();
 }