--- /dev/null
+\version "2.15.6"
+\header {
+
+ texidoc = "Tuplet brackets' outside staff priority can be
+set. Brackets, by default, carry their numbers with them."
+
+}
+
+\relative c'' {
+ % Plain old tuplet
+ \times 2/3 { a8 r a }
+ % With nothing set, collisions abound both horizontally and
+ % vertically
+ \times 2/3 { a8^\espressivo r a^\espressivo }
+ % Setting the staff priority prevents collisions
+ \override TupletBracket #'outside-staff-priority = #1
+ \times 2/3 { a8^\espressivo r a^\espressivo }
+ % Note that, with the outside-staff-priority set, this bracket
+ % should be at the same vertical level as the first one
+ \times 2/3 { a8 r a }
+}
}
}
+bool
+Axis_group_interface::has_outside_staff_parent (Grob *me)
+{
+ return (me
+ ? (scm_is_number (me->get_property ("outside-staff-priority"))
+ || has_outside_staff_parent (me->get_parent (Y_AXIS)))
+ : false);
+}
+
// TODO: it is tricky to correctly handle skyline placement of cross-staff grobs.
// For example, cross-staff beams cannot be formatted until the distance between
// staves is known and therefore any grobs that depend on the beam cannot be placed
Skyline_pair skylines;
for (i = 0; i < elements.size ()
&& !scm_is_number (elements[i]->get_property ("outside-staff-priority")); i++)
- if (!to_boolean (elements[i]->get_property ("cross-staff")))
+ if (!(to_boolean (elements[i]->get_property ("cross-staff")) || has_outside_staff_parent (elements[i])))
add_boxes (elements[i], x_common, y_common, &boxes, &skylines);
SCM padding_scm = me->get_property ("skyline-horizontal-padding");
void
Context::internal_set_property (SCM sym, SCM val)
{
- bool type_check_ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
-
if (do_internal_type_checking_global)
- assert (type_check_ok);
+ assert (type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")));
- if (type_check_ok)
- properties_dict ()->set (sym, val);
+ properties_dict ()->set (sym, val);
}
/*
static Interval rest_of_line_pure_height (Grob *me, int, int);
static Interval part_of_line_pure_height (Grob *me, bool begin, int, int);
+ static bool has_outside_staff_parent (Grob *me);
static Skyline_pair skyline_spacing (Grob *me, vector<Grob*> elements);
static void add_element (Grob *me, Grob *);
static void set_axes (Grob *, Axis, Axis);
tuplets_[i].number_ = make_spanner ("TupletNumber",
tuplets_[i].event_->self_scm ());
tuplets_[i].number_->set_object ("bracket", tuplets_[i].bracket_->self_scm ());
+ tuplets_[i].number_->set_parent (tuplets_[i].bracket_, X_AXIS);
+ tuplets_[i].number_->set_parent (tuplets_[i].bracket_, Y_AXIS);
tuplets_[i].bracket_->set_object ("tuplet-number", tuplets_[i].number_->self_scm ());
tuplets_[i].stop_moment_.grace_part_ = 0;