]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tuplet-bracket.cc
Merge branch 'lilypond/translation' into staging
[lilypond.git] / lily / tuplet-bracket.cc
index 478d53bb2a4bea9c8b1e617aed56c32cf9b8b9ef..40e0c728c5ef2c353de391bd5da025386bce7007 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 1997--2012 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -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];
         }
 
@@ -655,13 +658,16 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
                                   number->extent (commony, Y_AXIS)[dir]));
     }
 
-  if (to_boolean (me->get_property ("avoid-scripts")))
+  if (to_boolean (me->get_property ("avoid-scripts"))
+      && !scm_is_number (me->get_property ("outside-staff-priority")))
     {
       extract_grob_set (me, "scripts", scripts);
       for (vsize i = 0; i < scripts.size (); i++)
         {
           if (!scripts[i]->is_live ())
             continue;
+          if (scm_is_number (scripts[i]->get_property ("outside-staff-priority")))
+            continue;
 
           Interval script_x (scripts[i]->extent (commonx, X_AXIS));
           Interval script_y (scripts[i]->extent (commony, Y_AXIS));