From 06ca3bc5e23af107a5b63a1789d61d6cc4e6e6e3 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 4 Aug 2006 15:07:10 +0000 Subject: [PATCH] (set_loose_columns): oops: use space to next column for distance to fixed col. --- ChangeLog | 3 +++ lily/spacing-loose-columns.cc | 15 ++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 573b7776de..4e400a8e1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-08-04 Han-Wen Nienhuys + * lily/spacing-loose-columns.cc (set_loose_columns): oops: use + space to next column for distance to fixed col. + * VERSION (PACKAGE_NAME): release 2.9.14 * lily/pitched-trill-engraver.cc (make_trill): do set_parent also diff --git a/lily/spacing-loose-columns.cc b/lily/spacing-loose-columns.cc index bae5e99de1..cebabe1084 100644 --- a/lily/spacing-loose-columns.cc +++ b/lily/spacing-loose-columns.cc @@ -79,7 +79,7 @@ set_loose_columns (System *which, Column_x_positions const *posns) Grob *clique_col = clique[j]; Paper_column *loose_col = dynamic_cast (clique[j]); - Paper_column *last_col = dynamic_cast (clique[j-1]); + Paper_column *next_col = dynamic_cast (clique[j + 1]); Grob *spacing = unsmob_grob (clique_col->get_object ("spacing")); if (Grob *grace_spacing = unsmob_grob (clique_col->get_object ("grace-spacing"))) @@ -93,24 +93,25 @@ set_loose_columns (System *which, Column_x_positions const *posns) bool expand_only = false; Real base_note_space = 0.0; - if (Paper_column::is_musical (last_col) + if (Paper_column::is_musical (next_col) && Paper_column::is_musical (loose_col)) - base_note_space = Spacing_spanner::note_spacing (spacing, last_col, loose_col, + base_note_space = Spacing_spanner::note_spacing (spacing, loose_col, next_col, &options, &expand_only); else { Real fixed, space; - Spacing_spanner::standard_breakable_column_spacing (spacing, last_col, - loose_col, &fixed, &space, + Spacing_spanner::standard_breakable_column_spacing (spacing, + loose_col, next_col, + &fixed, &space, &options); base_note_space = space; } base_note_space = max (base_note_space, - robust_relative_extent (last_col, last_col, X_AXIS)[RIGHT] - - robust_relative_extent (loose_col, loose_col, X_AXIS)[LEFT]); + robust_relative_extent (loose_col, loose_col, X_AXIS)[RIGHT] + - robust_relative_extent (next_col, next_col, X_AXIS)[LEFT]); clique_spacing.push_back (base_note_space); } -- 2.39.2