]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/volta-engraver.cc
(stop_translation_timestep):
[lilypond.git] / lily / volta-engraver.cc
index fd65be42e0d7748a9c960a81f8f3558d4b52ade6..31afb71c3969e830f63f55892f532dd0ff1b74e3 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2000--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -51,7 +51,8 @@ Volta_engraver::Volta_engraver ()
 void
 Volta_engraver::process_music ()
 {
-  if (unsmob_grob (staff_))
+  if (unsmob_grob (staff_)
+      && !to_boolean (get_property ("voltaOnThisStaff")))
     {
       /*
        TODO: this does weird things when you open a piece with a
@@ -116,7 +117,8 @@ Volta_engraver::process_music ()
       volta_span_ =0;
     }
 
-  if (gh_string_p (start_string_) && volta_span_)
+  if (volta_span_ && 
+      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
     {
       warning (_ ("Already have a volta spanner.  Stopping that one prematurely."));
       
@@ -137,7 +139,8 @@ Volta_engraver::process_music ()
 void
 Volta_engraver::process_acknowledged_grobs ()
 {
-  if (!volta_span_ && gh_string_p (start_string_))
+  if (!volta_span_ && 
+      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
     {
       started_mom_ = now_mom () ;
 
@@ -211,7 +214,7 @@ Volta_engraver::stop_translation_timestep ()
 ENTER_DESCRIPTION(Volta_engraver,
 /* descr */       "Make volta brackets",
 /* creats*/       "VoltaBracket",
-/* accepts */     "general-music",
-/* acks  */      "bar-line-interface staff-symbol-interface note-column-interface",
+/* accepts */     "",
+/* acks  */       "bar-line-interface staff-symbol-interface note-column-interface",
 /* reads */       "repeatCommands voltaSpannerDuration stavesFound",
 /* write */       "");