+ bool neighbor_found = false;
+ extract_grob_set (me, "adjacent-hairpins", pins);
+ for (vsize i = 0; i < pins.size (); i++)
+ {
+ /*
+ FIXME: this will fuck up in case of polyphonic
+ notes in other voices. Need to look at note-columns
+ in the current staff/voice.
+ */
+
+ 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 = robust_relative_extent (b, common, X_AXIS);
+ if (neighbor_found)
+ {
+ /*
+ 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;
+ }
+ else
+ {
+ if (Note_column::has_interface (b)
+ && Note_column::has_rests (b))
+ x_points[d] = e[-d];
+ else
+ x_points[d] = e[d];
+
+ Item *bound = me->get_bound (d);
+ if (bound->is_non_musical (bound))
+ x_points[d] -= d * padding;
+ }