+#include "pointer-group-interface.hh"
+#include "spanner.hh"
+#include "staff-symbol-referencer.hh"
+#include "text-interface.hh"
+#include "note-column.hh"
+#include "warn.hh"
+
+MAKE_SCHEME_CALLBACK (Hairpin, after_line_breaking, 1);
+SCM
+Hairpin::after_line_breaking (SCM smob)
+{
+ Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+ consider_suicide (me);
+
+ return SCM_UNSPECIFIED;
+}
+
+void
+Hairpin::consider_suicide (Spanner*me)
+{
+ Drul_array<bool> broken;
+ Drul_array<Item *> bounds;
+ Direction d = LEFT;
+ do
+ {
+ bounds[d] = me->get_bound (d);
+ broken[d] = bounds[d]->break_status_dir () != CENTER;
+ }
+ while (flip (&d) != LEFT);
+
+ if (broken[LEFT]
+ && ly_is_equal (bounds[RIGHT]->get_column ()->get_property ("when"),
+ bounds[LEFT]->get_property ("when")))
+ me->suicide ();
+}