]> git.donarmstrong.com Git - lilypond.git/commitdiff
span-bar-.cc: Sort bar-line extents in case alignAboveContext is active
authorKeith OHara <k-ohara5a5a@oco.net>
Tue, 17 Jul 2012 04:24:22 +0000 (21:24 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Sun, 22 Jul 2012 19:52:31 +0000 (12:52 -0700)
input/regression/alignment-order.ly
lily/span-bar.cc

index 3bca500d099402283a3b8fcadd147e409100c551..e9510656c250fe422fb024ce003f0a1333cca5dc 100644 (file)
@@ -10,21 +10,23 @@ anywhere in the vertical alignment. "
 }
 
 \relative <<
-  \new Staff = "1" { c4 c s2 }
-  \new Staff = "2" { c4  c s2 }
-  \new Staff = "3" { c4  c s2 }
-  { \skip 2
+  \new Staff = "1" { c2 c s1 }
+  \new Staff = "2" { c2  c s1 }
+  \new StaffGroup <<
+    \new Staff = "3" { c2  c s1 }
+    { \skip 1
     <<
       \lyrics {
-       \set alignBelowContext = #"1"
-       below8 first staff
+        \set alignBelowContext = #"1"
+        below4 first staff
       }
       \new Staff {
-       \set Staff.alignAboveContext = #"3"
-       \times 4/6 {
-         \override TextScript #'padding = #3
-         c8^"this" d_"staff" e^"above" d_"last" e^"staff" f
-       }
+        \set Staff.alignAboveContext = #"3"
+        \times 4/6 {
+          \override TextScript #'padding = #3
+          c4^"this" d_"staff" e^"above" d_"last" e^"staff" f
+        }
       }
     >> }
+  >>
 >>
index 29a871a62dc11920eee6bd4aad51de99495a4f39..565231369339c213a65571fa67b198aaf5911446 100644 (file)
@@ -88,6 +88,9 @@ Span_bar::print (SCM smobbed_me)
   if (!model_bar)
     model_bar = me;
 
+  // Fixes problem with disappearing span bars when alignAboveContext is active
+  vector_sort (extents, Interval::left_less);
+
   Stencil span_bar;
   for (vsize i = 1; i < extents.size (); i++)
     {