From: Keith OHara Date: Tue, 17 Jul 2012 04:24:22 +0000 (-0700) Subject: span-bar-.cc: Sort bar-line extents in case alignAboveContext is active X-Git-Tag: release/2.15.42-1~40 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d4875d8e33dc505690710a07b1abb859732e8382;p=lilypond.git span-bar-.cc: Sort bar-line extents in case alignAboveContext is active --- diff --git a/input/regression/alignment-order.ly b/input/regression/alignment-order.ly index 3bca500d09..e9510656c2 100644 --- a/input/regression/alignment-order.ly +++ b/input/regression/alignment-order.ly @@ -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 + } } >> } + >> >> diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 29a871a62d..5652313693 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -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++) {