]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #557.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 25 Feb 2008 00:44:47 +0000 (21:44 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 25 Feb 2008 00:44:47 +0000 (21:44 -0300)
Fix ancient thinko with staccato dots on forced stem directions.
Document this case analysis.

input/regression/staccato-pos.ly
lily/side-position-interface.cc

index 68da7e545cfeb11fceb2b9bd13ddf02298db49c0..7f0d3210ee0a158abc87e999caee4d6cff0b0cd5 100644 (file)
   ragged-right = ##t
 }
 
-\context Voice {
-  \relative c' {
-    e'4-. f-. g-. d-. c-. b-.
-    \stemDown
-    e,-. d-. c-. b-. a-. g-.    
+{
+  \new Voice \relative c'' { 
+    \voiceOne
+    g8-. a-. b-. c-. 
+    a-. b-. c-. d-. 
+    b8[-. a-. g b] 
+    e,-. f-. g-. a-. 
+    e-. g-. b-. d-.
+  }
+  \context Voice {
+    \relative c' {
+      e'4-. f-. g-. d-. c-. b-.
+      \stemDown
+      e,-. d-. c-. b-. a-. g-.    
+    }
+    \relative c'' {
+      \stemUp           
+      d-> c-> b-> a-> g-> f-> e-> d->
+      d'
+      d-. c-. b-. a-. g-. f-. e-. d-. 
+    }  
   }
-  \relative c'' {
-    \stemUp             
-    d-> c-> b-> a-> g-> f-> e-> d->
-    d'
-    d-. c-. b-. a-. g-. f-. e-. d-. 
-  }  
 }
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)))