]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dot-column.cc
Fixes issue 1506 (X-axis overhang of StaffSymbol when RehearsalMarks present).
[lilypond.git] / lily / dot-column.cc
index fff2359cc0376f774e46ab531798213e0dd62e40..46b13811be3c9c20c70826c9b13b195ee60064e0 100644 (file)
@@ -132,15 +132,12 @@ Dot_column::calc_positioning_done (SCM smob)
        i != stems.end (); i++)
     {
       Grob *stem = (*i);
-      Stencil flag = Stem::flag (stem);
-      if (!flag.is_empty ())
+      Grob *flag = Stem::flag (stem);
+      if (flag)
         {
-          Interval y = flag.extent (Y_AXIS)
-                       * (2 / ss)
-                       + Stem::stem_end_position (stem);
-
-          Interval x = stem->relative_coordinate (commonx, X_AXIS)
-                       + flag.extent (X_AXIS);
+          Grob *commony = stem->common_refpoint (flag, Y_AXIS);
+          Interval y = flag->extent (commony, Y_AXIS) * (2 / ss);
+          Interval x = flag->extent (commonx, X_AXIS);
 
           boxes.push_back (Box (x, y));
         }