X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-spacing.cc;h=79a57bd47e6d83fcf7fd8ffbb89b57eb94b51658;hb=41b461e0a3dbe39d20e8198f284dea6775e14e0d;hp=9a71c00a598b9bee8aa42cf8de12769fb6d0470e;hpb=ce0bb5d14e583790b8557523feaf848fdfb4f88a;p=lilypond.git diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 9a71c00a59..79a57bd47e 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2001--2011 Han-Wen Nienhuys + Copyright (C) 2001--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,6 +31,7 @@ #include "separation-item.hh" #include "spacing-interface.hh" #include "staff-spacing.hh" +#include "staff-symbol-referencer.hh" #include "stem.hh" #include "warn.hh" @@ -273,17 +274,8 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn, Interval hp = Stem::head_positions (stem); if (!hp.is_empty ()) { - Real chord_start = hp[stem_dir]; - - /* - can't look at stem-end-position, since that triggers - beam slope computations. - */ - Real stem_end = hp[stem_dir] - + stem_dir * robust_scm2double (stem->get_property ("length"), 7); - - stem_posns[d] = Interval (min (chord_start, stem_end), - max (chord_start, stem_end)); + Real ss = Staff_symbol_referencer::staff_space (stem); + stem_posns[d] = stem->pure_height (stem, 0, INT_MAX) * (2 / ss); head_posns[d].unite (hp); } }