From d4875d8e33dc505690710a07b1abb859732e8382 Mon Sep 17 00:00:00 2001 From: Keith OHara Date: Mon, 16 Jul 2012 21:24:22 -0700 Subject: [PATCH] span-bar-.cc: Sort bar-line extents in case alignAboveContext is active --- input/regression/alignment-order.ly | 24 +++++++++++++----------- lily/span-bar.cc | 3 +++ 2 files changed, 16 insertions(+), 11 deletions(-) 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++) { -- 2.39.5