]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #666.
authorNeil Puttock <n.puttock@gmail.com>
Wed, 27 Aug 2008 23:07:38 +0000 (00:07 +0100)
committerNeil Puttock <n.puttock@gmail.com>
Thu, 28 Aug 2008 21:54:06 +0000 (22:54 +0100)
Slur::outside_slur_callback (): only set avoidance_offset if do_shift = true.

lily/slur.cc

index faa40725ad4644cb9024c70242180f25830b9ef2..604221e3f2d2087ce86186b17ea074172e5cedc6 100644 (file)
@@ -308,11 +308,13 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
     }
 
   Real avoidance_offset = 0.0;
-  for (int d = LEFT, k = 0; d <= RIGHT; d++, k++)
-    if (consider[k]) 
-      avoidance_offset = dir * (max (dir * avoidance_offset,
-                                    dir * (ys[k] - yext[-dir] + dir * slur_padding)));
-  
+  if (do_shift)
+    {
+      for (int d = LEFT, k = 0; d <= RIGHT; d++, k++)
+       if (consider[k])
+         avoidance_offset = dir * (max (dir * avoidance_offset,
+                                        dir * (ys[k] - yext[-dir] + dir * slur_padding)));
+    }
   return scm_from_double (offset + avoidance_offset);
 }