From: Han-Wen Nienhuys Date: Sat, 2 Dec 2006 11:35:36 +0000 (+0100) Subject: Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond X-Git-Tag: release/2.11.1-1~9^2~8^2~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=076b6e8c0da5ce9251bfef7ed1e85b74d52521ef;p=lilypond.git Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond --- 076b6e8c0da5ce9251bfef7ed1e85b74d52521ef diff --cc lily/accidental-placement.cc index f9cac96ac7,71c6af771e..c706ff4a69 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@@ -302,22 -302,20 +302,34 @@@ Accidental_placement::calc_positioning_ vector_sort (heads, less ()); uniq (heads); + + vector stems; + for (vsize i = 0; i < heads.size (); i++) + { + if (Grob *s = Rhythmic_head::get_stem (heads[i])) + stems.push_back (s); + } + + vector_sort (stems, less ()); + uniq (stems); + common[Y_AXIS] = common_refpoint_of_array (heads, common[Y_AXIS], Y_AXIS); + common[Y_AXIS] = common_refpoint_of_array (stems, common[Y_AXIS], Y_AXIS); + vector stems; + for (vsize i = 0; i < heads.size (); i++) + { + if (Grob *s = Rhythmic_head::get_stem (heads[i])) + { + stems.push_back (s); + common[Y_AXIS] = s->common_refpoint (common[Y_AXIS], Y_AXIS); + } + } + + vector_sort (stems, less ()); + uniq (stems); + + for (vsize i = apes.size (); i--;) { Accidental_placement_entry *ape = apes[i];