]> git.donarmstrong.com Git - lilypond.git/commitdiff
hairpin.cc: consider suicide before drawing stencil; issue 2583
authorKeith OHara <k-ohara5a5a@oco.net>
Fri, 10 Aug 2012 04:52:51 +0000 (21:52 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Wed, 15 Aug 2012 06:41:30 +0000 (23:41 -0700)
input/regression/hairpin-barline-break.ly
lily/grob-property.cc
lily/hairpin.cc

index 4d442a3655083f62ca6d9a13e211629aee64bf2a..6381b08c083af574c0b02178ad2bf9523ba93291 100644 (file)
@@ -1,14 +1,22 @@
 \header {
 
-  texidoc = "If a hairpin ends on the first note of a new stave, we
+  texidoc = "If a hairpin ends on the first note of a new staff, we
 do not print that ending.  But on the previous line, this hairpin
 should not be left open, and should end at the bar line. "
 }
 
 \version "2.14.0"
 
+\layout {
+  line-width = 4.\cm
+}
+
 \relative c' {
   c1\>
   \break
   c1\!
+  \override Hairpin #'to-barline = ##f
+  c1\>
+  \break
+  c1\!
 }
index 22c5fe2e7198e644d9001d8144587043671dbcbc..db16f2a54af248e4818f6cb7d9188ed3d28a2972 100644 (file)
@@ -251,7 +251,7 @@ Grob::try_callback_on_alist (SCM *alist, SCM sym, SCM proc)
       value = get_property_data (sym);
       assert (value == SCM_EOL || value == marker);
       if (value == marker)
-        *alist = scm_assq_remove_x (*alist, marker);
+        *alist = scm_assq_remove_x (*alist, sym);
     }
   else
     {
index cacfb0f51c148968f015fec995ef17d742ba24b3..40e165dd6d0ffe35c9cfff0051e19133129037ed 100644 (file)
@@ -127,14 +127,16 @@ Hairpin::print (SCM smob)
       broken[d] = bounds[d]->break_status_dir () != CENTER;
     }
 
-  broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT);
-  broken[RIGHT] = broken[RIGHT] && me->broken_neighbor (RIGHT)->is_live ();
-
   if (broken[RIGHT])
     {
       Spanner *next = me->broken_neighbor (RIGHT);
-      Stencil *s = next->get_stencil ();
-      if (!s || s->is_empty ())
+      // Hairpin-parts suicide in after-line-breaking if they need not be drawn
+      if (next)
+        {
+          (void) next->get_property ("after-line-breaking");
+          broken[RIGHT] = next->is_live ();
+        }
+      else
         broken[RIGHT] = false;
     }