]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/side-position-interface.cc
Fix #557.
[lilypond.git] / lily / side-position-interface.cc
index 19d9a88dc8ac86676ff2496a636c77167dc5dead..a3c4ca08a75a4594bb71c1f64200adac9cc56f72 100644 (file)
@@ -247,9 +247,11 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
          Real rounded = directed_round (position, dir);
          Grob *head = me->get_parent (X_AXIS);
 
-         if (fabs (position) <= 2 * Staff_symbol_referencer::staff_radius (me) + 1 
+         if (fabs (position) <= 2 * Staff_symbol_referencer::staff_radius (me) + 1
+             /* In case of a ledger lines, quantize even if we're outside the staff. */
              || (Note_head::has_interface (head)
-                 && sign (Staff_symbol_referencer::get_position (head)) == - dir))
+                 
+                 && abs (Staff_symbol_referencer::get_position (head)) > position))
            {
              o += (rounded - position) * 0.5 * ss;
              if (Staff_symbol_referencer::on_line (me, int (rounded)))