]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam-quanting.cc
Doc [nl]: Translation update.
[lilypond.git] / lily / beam-quanting.cc
index e868e51d7f124af9c4ee4a690a19890314569429..c5cafd5cfa9acb63e93723eaa7aa76347b06cc8a 100644 (file)
@@ -176,6 +176,8 @@ void Beam_scoring_problem::add_collision (Real x, Interval y,
   c.beam_y_.widen (0.5 * beam_thickness);
   
   c.x_ = x;
+
+  y *= 1/staff_space;
   c.y_ = y;
   c.base_penalty_ = score_factor;
   collisions_.push_back (c);
@@ -447,6 +449,12 @@ Beam_scoring_problem::solve () const {
   vector<Beam_configuration*> configs;
   generate_quants (&configs);
 
+  if (configs.empty ())
+    {
+      programming_error ("No viable beam quanting found.  Using unquanted y value.");
+      return unquanted_y;
+    }
+
   Beam_configuration *best = NULL;  
 
   bool debug =