--- /dev/null
+\header {
+
+ texidoc ="If a hairpin ends on the first note of a new stave, we
+don't print that ending. But on the previous line, this hairpin
+should not be left open, and should end at the barline. "
+}
+
+\version "2.9.26"
+\layout { ragged-right = ##t }
+\relative c' {
+ \set hairpinToBarline = ##t
+ c1\>
+ \break
+ c1\!
+}
{
Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
- consider_suicide (me);
+ if (Spanner *orig = dynamic_cast<Spanner*> (me->original ()))
+ {
+ for (vsize i = 0; i < orig->broken_intos_.size (); i++)
+ Hairpin::consider_suicide (orig->broken_intos_[i]);
+ }
+
SCM s = me->get_property ("grow-direction");
if (!is_direction (s))
{
broken[d] = bounds[d]->break_status_dir () != CENTER;
}
while (flip (&d) != LEFT);
+
+ broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT);
+ broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT)->is_live ();
+
if (broken[RIGHT])
{
- Spanner *orig = dynamic_cast<Spanner*> (me->original ());
- if (me->get_break_index ()
- < orig->broken_intos_.size () - 1)
- {
- Spanner *next = orig->broken_intos_[me->get_break_index () + 1];
- Stencil *s = next->get_stencil ();
- if (!s || s->is_empty ())
- broken[RIGHT] = false;
- }
+ Spanner *next = me->broken_neighbor (RIGHT);
+ Stencil *s = next->get_stencil ();
+ if (!s || s->is_empty ())
+ broken[RIGHT] = false;
}
Grob *common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS);