]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tuplet-bracket.cc
Release: update news.
[lilypond.git] / lily / tuplet-bracket.cc
index dbbd782cfbe7a219a09d7ec6d41a14330ace36b0..ba0ef6e236b3df365c876ae25d8b1528699bc0ac 100644 (file)
@@ -41,6 +41,7 @@
 */
 
 #include "tuplet-bracket.hh"
+#include "axis-group-interface.hh"
 #include "line-interface.hh"
 #include "beam.hh"
 #include "warn.hh"
@@ -203,8 +204,9 @@ Tuplet_bracket::calc_x_positions (SCM smob)
   Direction d = LEFT;
   do
     {
-      x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
-
+      x_span[d] = bounds[d]->break_status_dir ()
+                  ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[d]
+                  : robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
       if (connect_to_other[d])
         {
           Interval overshoot (robust_scm2drul (me->get_property ("break-overshoot"),
@@ -213,8 +215,9 @@ Tuplet_bracket::calc_x_positions (SCM smob)
           if (d == RIGHT)
             x_span[d] += d * overshoot[d];
           else
-            x_span[d] = robust_relative_extent (bounds[d],
-                                                commonx, X_AXIS)[RIGHT]
+            x_span[d] = (bounds[d]->break_status_dir ()
+                         ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[-d]
+                         : robust_relative_extent (bounds[d], commonx, X_AXIS)[-d])
                         - overshoot[LEFT];
         }
 
@@ -666,6 +669,14 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
           if (scm_is_number (scripts[i]->get_property ("outside-staff-priority")))
             continue;
 
+          // assume that if a script is avoiding slurs, it should not get placed
+          // under a tuplet bracket
+          SCM avoid = scripts[i]->get_property ("avoid-slur");
+          if (unsmob_grob (scripts[i]->get_object ("slur"))
+              && (avoid == ly_symbol2scm ("outside")
+                  || avoid == ly_symbol2scm ("around")))
+            continue;
+
           Interval script_x (scripts[i]->extent (commonx, X_AXIS));
           Interval script_y (scripts[i]->extent (commony, Y_AXIS));