From 35d76f132990937989036d9a88f03def876b9600 Mon Sep 17 00:00:00 2001
From: Joe Neeman <joeneeman@gmail.com>
Date: Mon, 20 Dec 2010 02:20:16 -0800
Subject: [PATCH] Fix 1460.

Make sure to use space_systems_with_fixed_number_per_page
at all appropriate places.
---
 lily/optimal-page-breaking.cc | 5 +----
 lily/page-breaking.cc         | 3 +++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lily/optimal-page-breaking.cc b/lily/optimal-page-breaking.cc
index e9010aec09..65663798b3 100644
--- a/lily/optimal-page-breaking.cc
+++ b/lily/optimal-page-breaking.cc
@@ -59,10 +59,7 @@ Optimal_page_breaking::solve ()
       /* find out the ideal number of pages */
       message (_ ("Finding the ideal number of pages..."));
   
-      if (systems_per_page () > 0)
-	best = space_systems_with_fixed_number_per_page (0, first_page_num);
-      else
-	best = space_systems_on_best_pages (0, first_page_num);
+      best = space_systems_on_best_pages (0, first_page_num);
 
       page_count = best.systems_per_page_.size ();
       ideal_sys_count = best.system_count ();
diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc
index bc9016ff6a..3272e02eef 100644
--- a/lily/page-breaking.cc
+++ b/lily/page-breaking.cc
@@ -1137,6 +1137,9 @@ Page_breaking::space_systems_on_n_or_one_more_pages (vsize configuration, vsize
 Page_spacing_result
 Page_breaking::space_systems_on_best_pages (vsize configuration, vsize first_page_num)
 {
+  if (systems_per_page_ > 0)
+    return space_systems_with_fixed_number_per_page (configuration, first_page_num);
+
   cache_line_details (configuration);
   Page_spacer ps (cached_line_details_, first_page_num, this);
 
-- 
2.39.5