From: janneke Date: Fri, 26 Jul 2002 01:03:24 +0000 (+0000) Subject: knee_b fix X-Git-Tag: release/1.5.71~62 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0878f7e44f148424916d2bbdff2e0c6eb74499a2;p=lilypond.git knee_b fix --- diff --git a/lily/beam.cc b/lily/beam.cc index f1da1fec87..c2d024df6a 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -488,10 +488,13 @@ Beam::set_stem_directions (Grob *me, Direction d) natural direction. In any case, when knee, beam direction is foe. - TODO: for x staff knees, set direction pointing to 'the other' staff, rather than natural. + TODO: for x staff knees, set direction pointing to 'the + other' staff, rather than natural. */ if (knee_b(me)) - Stem::get_direction (s); // this actually sets it, if necessary + { + Stem::get_direction (s); // this actually sets it, if necessary + } else { SCM force = s->remove_grob_property ("dir-forced"); @@ -1298,18 +1301,22 @@ Beam::knee_b (Grob*me) bool knee = false; int d = 0; for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) - if (d != Directional_element_interface::get (unsmob_grob (ly_car (s)))) - { - knee = true; - break; - } + { + Direction dir = Directional_element_interface::get + (unsmob_grob (ly_car (s))); + if (d && d != dir) + { + knee = true; + break; + } + d = dir; + } me->set_grob_property ("knee", gh_bool2scm (knee)); return knee; } - ADD_INTERFACE (Beam, "beam-interface", "A beam.