diff options
author | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-11-09 14:35:08 +0100 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2006-11-09 14:35:08 +0100 |
commit | 642031d0735ba4046ff5a7acea374a669f5cba13 (patch) | |
tree | 611a0329ed4550e806fad287ad43cca47872d657 /lily/hairpin.cc | |
parent | 6b2fa48e78eff68d3dde5fcd951d1c3a106a38ae (diff) |
only consider hairpin broken if it continues on next line. Fixes #151
Diffstat (limited to 'lily/hairpin.cc')
-rw-r--r-- | lily/hairpin.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 4b9c215e2e..ca5a7c050d 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -58,7 +58,12 @@ Hairpin::print (SCM smob) { 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)) { @@ -78,17 +83,16 @@ Hairpin::print (SCM smob) 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); |