]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/slur.cc
Removes closeness-factor from the Slur details list
[lilypond.git] / lily / slur.cc
index 964a4d091b210e0ab78f4bb8c980291679a317e1..1f41607307f20ec403fa0ba084369294d561aeed 100644 (file)
@@ -270,6 +270,16 @@ Slur::outside_slur_callback (SCM grob, SCM offset_scm)
 
   Interval yext = robust_relative_extent (script, cy, Y_AXIS);
   Interval xext = robust_relative_extent (script, cx, X_AXIS);
+  Interval slur_wid (curve.control_[0][X_AXIS], curve.control_[3][X_AXIS]);
+
+  bool contains = false;
+  Direction d = LEFT;
+  do
+    contains |= slur_wid.contains (xext[d]);
+  while (flip (&d) != LEFT);
+
+  if (!contains)
+    return offset_scm;
 
   Real offset = robust_scm2double (offset_scm, 0);
   yext.translate (offset);
@@ -429,8 +439,6 @@ ADD_INTERFACE (Slur,
                "Demerit to apply when note heads collide with a slur.\n"
                "@item stem-encompass-penalty\n"
                "Demerit to apply when stems collide with a slur.\n"
-               "@item closeness-factor\n"
-               "Additional demerit used when scoring encompasses.\n"
                "@item edge-attraction-factor\n"
                "Factor used to calculate the demerit for distances"
                " between slur endpoints and their corresponding base"
@@ -486,7 +494,7 @@ ADD_INTERFACE (Slur,
 
                /* properties */
                "annotation "
-               "avoid-slur "    /* UGH. */
+               "avoid-slur "  /* UGH. */
                "control-points "
                "dash-definition "
                "details "