]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-number-engraver.cc
2003 -> 2004
[lilypond.git] / lily / bar-number-engraver.cc
index 4e1a45d1801db680967ddcb0a0700f589127e865..bfdba32328327c9171dd76579719c90e573b2c3f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -34,7 +34,7 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void process_music ();
   void create_items ();
-  TRANSLATOR_DECLARATIONS(  Bar_number_engraver );
+  TRANSLATOR_DECLARATIONS(Bar_number_engraver );
 };
 
 
@@ -54,7 +54,8 @@ Bar_number_engraver::process_music ()
        {
          SCM bn = get_property ("currentBarNumber");
          SCM proc = get_property ("barNumberVisibility");
-         if (gh_number_p (bn) && to_boolean(gh_call1(proc, bn)))
+         if (gh_number_p (bn) && gh_procedure_p (proc)
+             && to_boolean(gh_call1(proc, bn)))
            {
              create_items ();
              // guh.
@@ -107,8 +108,7 @@ Bar_number_engraver::create_items ()
   if (text_)
     return;
 
-  SCM b = get_property ("BarNumber");
-  text_ = new Item (b);
+  text_ = make_item ("BarNumber");
   Side_position_interface::set_axis (text_,Y_AXIS);
 
   announce_grob(text_, SCM_EOL);