]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/timing-engraver.cc
patch::: 1.3.59.uu2.jcn1
[lilypond.git] / lily / timing-engraver.cc
index ac2373da6a0c39d8a0d23cb41bae1185e15d022b..68c34aeff62d8ff416a98a32263da37e73c752e6 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>
 */
 
 #include "score-engraver.hh"
 #include "score-element-info.hh"
 #include "multi-measure-rest.hh"
 
-
-
 ADD_THIS_TRANSLATOR(Timing_engraver);
 
-
 void
 Timing_engraver::do_post_move_processing( )
 {
   bar_req_l_ = 0;
   Timing_translator::do_post_move_processing ();
+  
 }
 
 bool
@@ -29,7 +27,7 @@ Timing_engraver::do_try_music (Music*m)
 {
   if (Bar_req  * b= dynamic_cast <Bar_req *> (m))
     {
-      if (bar_req_l_ && bar_req_l_->equal_b (b)) // huh?
+      if (bar_req_l_ && !bar_req_l_->equal_b (b)) // huh?
        return false;
       
       bar_req_l_ = b;
@@ -39,7 +37,9 @@ Timing_engraver::do_try_music (Music*m)
   return Timing_translator::do_try_music (m);
 }
 
-
+/*
+  TODO make properties of this.
+ */
 String
 Timing_engraver::which_bar ()
 {
@@ -48,14 +48,14 @@ Timing_engraver::which_bar ()
       if (!now_mom ())
        return "|";
 
-      SCM nonauto = get_property ("barNonAuto", 0);
-      if (!gh_boolean_p (nonauto) && gh_scm2bool (nonauto))
+      SCM nonauto = get_property ("barNonAuto");
+      if (!to_boolean (nonauto))
        {
-         SCM always = get_property ("barAlways", 0);
+         SCM always = get_property ("barAlways");
          if (!measure_position ()
-             || (gh_boolean_p (always) && gh_scm2bool (always)))
+             || (to_boolean (always)))
            {
-             SCM def=get_property ("defaultBarType" ,0);
+             SCM def=get_property ("defaultBarType" );
              return (gh_string_p (def))? ly_scm2string (def) : "";
            }
        }