From 0dfbd17e1f271c91f829927536b6281bf97a3efa Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 6 Apr 1998 18:45:13 +0000 Subject: [PATCH] lilypond-0.1.54 --- lily/score-priority-grav.cc | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/lily/score-priority-grav.cc b/lily/score-priority-grav.cc index 1358ec4232..9e2e2cc918 100644 --- a/lily/score-priority-grav.cc +++ b/lily/score-priority-grav.cc @@ -36,42 +36,40 @@ void Score_priority_engraver::acknowledge_element (Score_elem_info inf) { Item * item_l = inf.elem_l_->item (); - if (item_l && item_l->breakable_b_) + if (item_l && item_l->breakable_b_ && !item_l->empty_b ()) { /* Don't try to eat up our (probable) parent. - */ + */ if (inf.origin_grav_l_arr_.size () <= 1 && item_l->is_type_b (Break_align_item::static_name ())) return; - int p =item_l-> break_priority_i_; + int priority =item_l->break_priority_i_; Horizontal_group_item * hg =0; - if (!align_p_assoc_.elt_b(p)) - { - hg = new Horizontal_group_item; - announce_element (Score_elem_info (hg,0)); - align_p_assoc_[p] = hg; - hg->break_priority_i_ = p; - hg->breakable_b_ = true; - } + if (!align_p_assoc_.elt_b(priority)) + { + hg = new Horizontal_group_item; + announce_element (Score_elem_info (hg,0)); + align_p_assoc_[priority] = hg; + hg->break_priority_i_ = priority; + hg->breakable_b_ = true; + } else - hg = align_p_assoc_[p]; + hg = align_p_assoc_[priority]; Score_elem * unbound_elem = inf.elem_l_; - while (unbound_elem->axis_group_l_a_[X_AXIS]) { /* We might have added inf.elem_l_ earlier because we added one of its children. We don't want to add ourselves to ourself - */ + */ if (unbound_elem->axis_group_l_a_[X_AXIS] == hg) return; unbound_elem = unbound_elem->axis_group_l_a_[X_AXIS]; } - hg->add_element (unbound_elem); } -- 2.39.5