There was previously a circular dependency that went:
TupletNumber needs TupletBracket position
TupletBracket needs Script position
Script with avoid-slur set to around or outside needs Slur position
Slur needs TupletNumber position
This is avoided by not doing Script vs TupletBracket collision
avoidance for Scripts that (a) are encompassed by a slur; and (b)
have avoid-slur set to outside or around. The worst-case scenario,
then, is the same collision that would have been present before
Slur vs TupletBracket collision avoidance was implemented. A more
thorough solution would be to have an avoid-tuplet-bracket property
that functions like avoid-slur.
--- /dev/null
+\version "2.15.35"
+
+\header {
+ texidoc = "Tuplet number position is correct when slurs and scripts
+are present.
+"
+}
+
+\relative c'
+{
+ R1 |
+ \break
+ \times 2/3 { e8(-> e e) }
+}
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));