]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/multi-measure-rest.cc
release: 1.2.13
[lilypond.git] / lily / multi-measure-rest.cc
index 41d8018b05e49a67f9b4558c81ab9b0b6279af3e..1254eb4c6bb75dc9e460b74777140c43f9f4b3a9 100644 (file)
@@ -10,7 +10,7 @@
 #include "multi-measure-rest.hh"
 #include "debug.hh"
 #include "paper-def.hh"
-#include "p-col.hh" // urg
+#include "paper-column.hh" // urg
 #include "bar.hh"
 #include "lookup.hh"
 #include "rest.hh"
@@ -27,7 +27,7 @@ void
 Multi_measure_rest::do_print () const
 {
 #ifndef NPRINT
-  DOUT << "measures_i_ " << measures_i_;
+  DEBUG_OUT << "measures_i_ " << measures_i_;
 #endif
 }
 
@@ -50,7 +50,8 @@ Multi_measure_rest::do_brew_molecule_p () const
     {
       Item * col = spanned_drul_[d]->column_l ();
 
-      Interval coldim = col->extent (X_AXIS);
+      Interval coldim = col->extent (X_AXIS)
+       + col->relative_coordinate (0, X_AXIS);
 
       sp_iv[d] = coldim[-d]  ;
     }
@@ -58,10 +59,7 @@ Multi_measure_rest::do_brew_molecule_p () const
   Molecule *mol_p  = new Molecule;
   Real x_off = 0.0;
 
-
-  //  Dimension_cache * col_ref = spanned_drul_[LEFT]->column_l ()->dim_cache_[X_AXIS];
-
-  Real rx  = spanned_drul_[LEFT]->absolute_coordinate (X_AXIS);
+  Real rx  = spanned_drul_[LEFT]->relative_coordinate (0, X_AXIS);
   /*
     we gotta stay clear of sp_iv, so move a bit to the right if
     needed.
@@ -100,7 +98,7 @@ Multi_measure_rest::do_brew_molecule_p () const
   else if (measures_i_ > 1)
     {
       Molecule s ( lookup_l ()->text ("number", to_str (measures_i_), paper_l ()));
-
+      s.align_to (X_AXIS, CENTER);
       s.translate_axis (3.0 * interline_f, Y_AXIS);
       mol_p->add_molecule (s);
     }
@@ -155,8 +153,8 @@ Multi_measure_rest::get_rods () const
 
   Item * l = spanned_drul_[LEFT]->column_l ();
   Item * r = spanned_drul_[RIGHT]->column_l ();
-  Item * lb = l->find_prebroken_piece (RIGHT);
-  Item * rb = r->find_prebroken_piece (LEFT);      
+  Item * lb = l->find_broken_piece (RIGHT);
+  Item * rb = r->find_broken_piece (LEFT);      
   
   Item* combinations[4][2]={{l,r}, {lb,r}, {l,rb},{lb,rb}};
   for (int i=0; i < 4; i++)