]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam.cc
Merge branch 'master' of git://git.savannah.gnu.org/lilypond.git
[lilypond.git] / lily / beam.cc
index 288eb226bcf718779e7275aa3b081d642062961c..1bb0a209a859666c271dfed1c955d556723ecfa0 100644 (file)
@@ -555,6 +555,8 @@ Beam::print (SCM grob)
   Spanner *me = unsmob_spanner (grob);
   Grob *commonx = 0;
   vector<Beam_segment> segments = get_beam_segments (me, &commonx);
+  if (!segments.size ())
+    return SCM_EOL;
 
   Interval span;
   if (normal_stem_count (me))
@@ -974,7 +976,11 @@ Beam::no_visible_stem_positions (Grob *me, Interval default_value)
     }
 
   Direction dir = get_grob_direction (me);
-  Real y = head_positions[dir]
+
+  if (!dir)
+    programming_error ("The beam should have a direction by now.");
+
+  Real y = head_positions.linear_combination (dir)
     * 0.5 * Staff_symbol_referencer::staff_space (me)
     + dir * get_beam_translation (me) * (multiplicity.length () + 1);
 
@@ -1203,11 +1209,6 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
       if (!covered[i]->is_live())
         continue;
 
-      // TODO - use this logic in is_cross_staff.
-      if (is_cross_staff (me)
-          && Align_interface::has_interface (common_refpoint_of_array (stems, me, Y_AXIS)))
-        continue;
-
       if (Beam::has_interface (covered[i]) && is_cross_staff (covered[i]))
         continue;