]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/multi-measure-rest.cc
Fix #122.
[lilypond.git] / lily / multi-measure-rest.cc
index 997e76105d2a1764d8d2cdc8915375ec331b2a3d..44d699b7ce1bcd0b35137945f03c1ad490c008cf 100644 (file)
@@ -32,20 +32,22 @@ Multi_measure_rest::percent (SCM smob)
 
   // ugh copy & paste.
 
+  Grob *common_x = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT),
+                                                         X_AXIS);
   Interval sp_iv;
   Direction d = LEFT;
   do
     {
       Item *col = sp->get_bound (d)->get_column ();
 
-      Interval coldim = col->extent (0, X_AXIS);
+      Interval coldim = robust_relative_extent (col, common_x, X_AXIS);
 
       sp_iv[d] = coldim[-d];
     }
   while ((flip (&d)) != LEFT);
   Real x_off = 0.0;
 
-  Real rx = sp->get_bound (LEFT)->relative_coordinate (0, X_AXIS);
+  Real rx = sp->get_bound (LEFT)->relative_coordinate (common_x, X_AXIS);
   /*
     we gotta stay clear of sp_iv, so move a bit to the right if
     needed.
@@ -349,7 +351,7 @@ Multi_measure_rest::set_text_rods (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
-ADD_INTERFACE (Multi_measure_rest, "multi-measure-rest-interface",
+ADD_INTERFACE (Multi_measure_rest,
               "A rest that spans a whole number of measures.",
 
               /* properties */