]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/slur.cc
Run `make grand-replace'.
[lilypond.git] / lily / slur.cc
index faa40725ad4644cb9024c70242180f25830b9ef2..2bc0ea072c9909ac2da9f10837aeccea648f4788 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1996--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
@@ -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);
 }