]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam.cc
* po/nl.po: Some updates.
[lilypond.git] / lily / beam.cc
index 7b7c3d9cc39620476613627c9620ab590a25caf7..7539ce8907ae55b531c500a1d2ba1170f6006b74 100644 (file)
@@ -43,8 +43,6 @@ Notes:
 #include "spanner.hh"
 #include "warn.hh"
 
-bool debug_beam_quanting_flag;
-
 
 #if DEBUG_QUANTING
 #include "text-item.hh"  // debug output.
@@ -510,7 +508,7 @@ Beam::print (SCM grob)
 
 #if (DEBUG_QUANTING)
   SCM quant_score = me->get_property ("quant-score");
-  if (debug_beam_quanting_flag
+  if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
       && ly_c_string_p (quant_score))
     {
       
@@ -522,13 +520,13 @@ Beam::print (SCM grob)
       String str;
       SCM properties = Font_interface::text_font_alist_chain (me);
 
+      Direction stem_dir = stems.size() ? to_dir (stems[0]->get_property ("direction")) : UP;
+    
       Stencil tm = *unsmob_stencil (Text_item::interpret_markup
         (me->get_paper ()->self_scm (), properties, quant_score));
-      the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0, 0);
+      the_beam.add_at_edge (Y_AXIS, stem_dir, tm, 1.0, 0);
     }
 #endif
-    
-  
   
   return the_beam.smobbed_copy ();
 }
@@ -914,11 +912,11 @@ Beam::least_squares (SCM smob)
 
       /*
        For broken beams this doesn't work well. In this case, the
-        slope esp. of the first part of a broken beam should predict
-        where the second part goes.
-       */
+       slope esp. of the first part of a broken beam should predict
+       where the second part goes.
+      */
       me->set_property ("least-squares-dy",
-                            scm_make_real (pos[RIGHT] - pos[LEFT]));
+                       scm_make_real (pos[RIGHT] - pos[LEFT]));
     }
   else
     {
@@ -1160,7 +1158,7 @@ Beam::check_concave (SCM smob)
   if (is_concave1 || concaveness2 > r2)
     {
       Drul_array<Real> pos = ly_scm2interval (me->get_property ("positions"));
-      Real r = linear_combination (pos, 0);
+      Real r = linear_combination (pos, 0.0);
 
       r /= Staff_symbol_referencer::staff_space (me);
       me->set_property ("positions", ly_interval2scm (Drul_array<Real> (r, r)));