]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spacing-determine-loose-columns.cc
Warnings: Move all warning-as-error handling to warn.cc
[lilypond.git] / lily / spacing-determine-loose-columns.cc
index 79551ecac37d5d06aaed4ea40175c413179a1ae2..a195495529d25046fcc088b7b8f0a60c81aefcd2 100644 (file)
@@ -163,7 +163,7 @@ Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
             }
           else if (Staff_spacing::has_interface (sp))
             {
-              Spring spring = Staff_spacing::get_spacing (sp, rc);
+              Spring spring = Staff_spacing::get_spacing (sp, rc, 0.0);
 
               dists[d] = max (dists[d], spring.min_distance ());
             }
@@ -191,7 +191,6 @@ Spacing_spanner::prune_loose_columns (Grob *me,
                                       Spacing_options *options)
 {
   vector<Grob *> newcols;
-
   for (vsize i = 0; i < cols->size (); i++)
     {
       Grob *c = cols->at (i);
@@ -243,14 +242,14 @@ Spacing_spanner::prune_loose_columns (Grob *me,
               /*
                 Set distance constraints for loose columns
               */
-              Drul_array<Item *> next_door (dynamic_cast<Item *> (cols->at (i - 1)),
-                                            dynamic_cast<Item *> (cols->at (i + 1)));
+              Drul_array<Item *> next_door (dynamic_cast<Item *> (left_neighbor),
+                                            dynamic_cast<Item *> (right_neighbor));
 
               set_distances_for_loose_col (me, c, next_door, options);
             }
         }
 
-      if (!loose)
+      else
         newcols.push_back (c);
     }