- Spanner *pin = dynamic_cast<Spanner *> (pins[i]);
- if (pin
- && (pin->get_bound (LEFT)->get_column () == b->get_column ()
- || pin->get_bound (RIGHT)->get_column () == b->get_column ()))
- neighbor_found = true;
- }
+ Interval e = (Axis_group_interface::has_interface (b)
+ ? Axis_group_interface::generic_bound_extent (b, common, X_AXIS)
+ : robust_relative_extent (b, common, X_AXIS));
+ if (neighbor_found)
+ {
+ if (Hairpin::has_interface (adjacent))
+ {
+ /*
+ Handle back-to-back hairpins with a circle in the middle
+ */
+ if (circled_tip && (grow_dir != d))
+ x_points[d] = e.center () + d * (rad - thick / 2.0);
+ /*
+ If we're hung on a paper column, that means we're not
+ adjacent to a text-dynamic, and we may move closer. We
+ make the padding a little smaller, here.
+ */
+ else
+ x_points[d] = e.center () - d * padding / 3;
+ }
+ // Our neighbor is a dynamic text spanner, so add the
+ // same amount of padding as for text dynamics
+ else
+ x_points[d] = e[-d] - d * padding;
+ }
+ else
+ {
+ if (Note_column::has_interface (b)
+ && Note_column::has_rests (b))
+ x_points[d] = e[-d];
+ else
+ x_points[d] = e[d];