]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spacing-spanner.cc
fix error message
[lilypond.git] / lily / spacing-spanner.cc
index 3177368245b6bef825d629014d537b2b369a658f..a61bffb98a3aa41d7a417ee493a17e7412e127b0 100644 (file)
@@ -50,7 +50,7 @@ Spacing_spanner::set_springs (SCM smob)
   Spanner *me = unsmob_spanner (smob);
 
   /*
-    can't use get_system() ? --hwn.
+    can't use get_system () ? --hwn.
   */
   Spacing_options options;
   options.init_from_grob (me);
@@ -223,7 +223,7 @@ Spacing_spanner::generate_springs (Grob *me,
   for (vsize i = 0; i < cols.size (); i++)
     {
       Paper_column *col = dynamic_cast<Paper_column *> (cols[i]);
-      Paper_column *next = (i < cols.size()-1) ? dynamic_cast<Paper_column *> (cols[i+1]) : 0;
+      Paper_column *next = (i + 1 < cols.size ()) ? dynamic_cast<Paper_column *> (cols[i+1]) : 0;
       
       if (i > 0)
        generate_pair_spacing (me, prev, col, next, options);
@@ -318,11 +318,15 @@ Spacing_spanner::musical_column_spacing (Grob *me,
 
          if (!Paper_column::is_musical (right_col))
            {
-             Real left_col_stick_out = robust_relative_extent (left_col, left_col,  X_AXIS)[RIGHT];
-             compound_fixed_note_space = max (left_col_stick_out, options->increment_);
-
+             /*
+               There used to be code that examined left_col->extent
+               (X_AXIS), but this is resulted in unexpected wide
+               spacing, because the width of s^"text" output is also
+               taken into account here.
+              */
+             compound_fixed_note_space = options->increment_;
              compound_note_space = max (base_note_space,
-                                        base_note_space - options->increment_ + left_col_stick_out);
+                                        options->increment_);
            }
          else
            {
@@ -401,7 +405,7 @@ bool
 Spacing_spanner::fills_measure (Grob *me, Item *left, Item *col)
 {
   System *sys = get_root_system (me);
-  Item *next = sys->column (col->get_column()->get_rank () + 1);
+  Item *next = sys->column (col->get_column ()->get_rank () + 1);
   if (!next)
     return false;
 
@@ -429,6 +433,7 @@ Spacing_spanner::fills_measure (Grob *me, Item *left, Item *col)
 
   return false;
 }
+
 /*
   Read hints from L and generate springs.
 */