]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-number-engraver.cc
release: 1.3.26
[lilypond.git] / lily / bar-number-engraver.cc
index e28939ca6788ec3ea893de16f3a3f05117ee042a..bf22b44c614062ea0b0797019b8370231f2a3842 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -28,11 +28,17 @@ Bar_number_engraver::do_process_requests ()
   Timing_translator *time = dynamic_cast<Timing_translator*>(tr);
 
   // todo include (&&!time->cadenza_b_ )
-  if (!time->measure_position () && now_mom () > Moment (0))
+  SCM bn = get_property("currentBarNumber",0);
+
+  if (gh_number_p (bn) &&
+      !time->measure_position () && now_mom () > Moment (0))
     {
       create_items (0);
-       
-      text_p_->text_str_ = to_str (time->bars_i ());
+
+      // guh.
+      text_p_->set_elt_property ("text",
+                                ly_str02scm (to_str (gh_scm2int (bn)).ch_C()));
+                                
     }
 }