]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/volta-engraver.cc
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / volta-engraver.cc
index fefc68e7f3ef460887c5cb7aa21e2fa0e083ae32..604c53c573493721796b068f66db084b4ae0c5ba 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2000--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "engraver.hh"
@@ -12,6 +12,7 @@
 #include "context.hh"
 #include "international.hh"
 #include "note-column.hh"
+#include "item.hh"
 #include "side-position-interface.hh"
 #include "staff-symbol.hh"
 #include "text-interface.hh"
@@ -30,6 +31,7 @@ public:
   TRANSLATOR_DECLARATIONS (Volta_engraver);
 protected:
 
+  DECLARE_END_ACKNOWLEDGER (staff_symbol);
   DECLARE_ACKNOWLEDGER (staff_symbol);
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_ACKNOWLEDGER (bar_line);
@@ -139,7 +141,7 @@ Volta_engraver::process_music ()
 
   if (end && !volta_span_)
     /* fixme: be more verbose.  */
-    warning (_ ("can't end volta spanner"));
+    warning (_ ("cannot end volta spanner"));
   else if (end)
     {
       end_volta_span_ = volta_span_;
@@ -189,6 +191,13 @@ Volta_engraver::acknowledge_bar_line (Grob_info i)
     Volta_bracket_interface::add_bar (end_volta_span_, i.item ());
 }
 
+void
+Volta_engraver::acknowledge_end_staff_symbol (Grob_info i)
+{
+  if (i.grob ()->self_scm () == staff_)
+    staff_ = SCM_EOL;
+}
+
 void
 Volta_engraver::acknowledge_staff_symbol (Grob_info i)
 {
@@ -202,6 +211,7 @@ Volta_engraver::acknowledge_staff_symbol (Grob_info i)
     staff_ = i.grob ()->self_scm ();
 }
 
+
 void
 Volta_engraver::finalize ()
 {
@@ -244,11 +254,11 @@ Volta_engraver::stop_translation_timestep ()
   TODO: should attach volta to paper-column if no bar is found.
 */
 ADD_ACKNOWLEDGER (Volta_engraver, staff_symbol);
+ADD_END_ACKNOWLEDGER (Volta_engraver, staff_symbol);
 ADD_ACKNOWLEDGER (Volta_engraver, note_column);
 ADD_ACKNOWLEDGER (Volta_engraver, bar_line);
 ADD_TRANSLATOR (Volta_engraver,
                /* doc */ "Make volta brackets.",
                /* create */ "VoltaBracket",
-               /* accept */ "",
                /* read */ "repeatCommands voltaSpannerDuration stavesFound",
                /* write */ "");