X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=blobdiff_plain;f=lily%2Falign-element.cc;h=d2091295152ccd15f51a1bbb2d0e407076014b70;hb=07d4d05df6479d58c3c5152c07d7c86b94ee98b4;hp=0705d693883eacd6b6f7dfccd355e834072c3f29;hpb=301b0906a670e7f7762df325f65d58d8c85f4067;p=lilypond.git diff --git a/lily/align-element.cc b/lily/align-element.cc index 0705d69388..d209129515 100644 --- a/lily/align-element.cc +++ b/lily/align-element.cc @@ -92,10 +92,9 @@ Align_element::do_side_processing () Link_array elems; for (int i=0; i < elem_l_arr_.size(); i++) { - Interval y = elem_l_arr_[i]->extent(axis ()); + Interval y = elem_l_arr_[i]->extent(axis ()) + elem_l_arr_[i]->relative_coordinate (this, axis ()); if (!y.empty_b()) { - Score_element *e =dynamic_cast(elem_l_arr_[i]); // todo: fucks up if item both in Halign & Valign. @@ -229,10 +228,11 @@ Align_element::get_elt_by_priority (int p) const } int -Align_element::get_priority (Score_element* e) const +Align_element::get_priority (Score_element const * e) const { - if ( priority_i_hash_.elem_b (e)) - return priority_i_hash_[e]; + Score_element * nonconst = (Score_element*) e; + if ( priority_i_hash_.elem_b (nonconst)) + return priority_i_hash_[nonconst]; else - return elem_l_arr_.find_i (e); + return elem_l_arr_.find_i (nonconst); }