]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/volta-engraver.cc
* lily/auto-beam-engraver.cc (process_music): end/junk beam if
[lilypond.git] / lily / volta-engraver.cc
index 587a9e0981392cd8b6100914b6e12e67e8d9133d..e95718b12156e896dcb099de6bea87095dd9e991 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
@@ -82,7 +83,8 @@ Volta_engraver::process_music ()
     {
       SCM c = ly_car (cs);
 
-      if (gh_pair_p (c) && ly_car (c) == ly_symbol2scm ("volta")
+      if (gh_pair_p (c)
+         && ly_car (c) == ly_symbol2scm ("volta")
          && gh_pair_p (ly_cdr (c)))
        {
          if (ly_cadr (c) ==  SCM_BOOL_F)
@@ -116,7 +118,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 +140,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,6 +215,7 @@ Volta_engraver::stop_translation_timestep ()
 ENTER_DESCRIPTION(Volta_engraver,
 /* descr */       "Make volta brackets",
 /* creats*/       "VoltaBracket",
+/* accepts */     "",
 /* acks  */       "bar-line-interface staff-symbol-interface note-column-interface",
 /* reads */       "repeatCommands voltaSpannerDuration stavesFound",
 /* write */       "");