]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dynamic-align-engraver.cc
Add documentation on how to use Page_breaking.
[lilypond.git] / lily / dynamic-align-engraver.cc
index 96d19b7ded506402fa17323bbf69fdd79004f474..43498089d003fd96d1d066bcdc5af61825f219a9 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2008--2010 Han-Wen Nienhuys <hanwen@lilypond.org>
+  Copyright (C) 2008--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
 
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -100,7 +100,17 @@ Dynamic_align_engraver::acknowledge_dynamic (Grob_info info)
   Stream_event *cause = info.event_cause ();
   create_line_spanner (cause);
   if (Spanner::has_interface (info.grob ()))
-    started_.push_back (info.spanner ());
+    {
+      started_.push_back (info.spanner ());
+      /*
+       If we are using text spans instead of hairpins and the line
+       is hidden, end the alignment spanner early: this allows dynamics
+       to be spaced individually instead of being linked together.
+      */
+      if (info.grob ()->internal_has_interface (ly_symbol2scm ("dynamic-text-spanner-interface"))
+         && (info.grob ()->get_property ("style") == ly_symbol2scm ("none")))
+       early_end_ = true;
+    }
   else if (info.item ())
     scripts_.push_back (info.item ());
   else