]> git.donarmstrong.com Git - lilypond.git/commitdiff
regression fixes and output prettification
authorJoe Neeman <joeneeman@gmail.com>
Sat, 5 May 2007 01:50:35 +0000 (11:50 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 5 May 2007 01:50:35 +0000 (11:50 +1000)
lily/optimal-page-breaking.cc
lily/page-breaking.cc
lily/page-spacing.cc
scm/define-grobs.scm

index 0e4f06dbcb8d7e153805d7f4329a322009561fe4..d9aec185505b928192fbc35354a19fcb01bf1a21 100644 (file)
@@ -62,7 +62,11 @@ Optimal_page_breaking::solve ()
   if (page_count > 1)
     min_sys_count -= best.systems_per_page_[page_count - 2];
 
-  message (_f ("Fitting music on %d (or one fewer) pages...", (int)page_count));
+  if (page_count == 1)
+    message (_ ("Fitting music on 1 page..."));
+  else
+    message (_f ("Fitting music on %d or %d pages...", (int)page_count-1, (int)page_count));
+
   /* try a smaller number of systems than the ideal number for line breaking */
   bound = ideal_line_division;
   for (vsize sys_count = ideal_sys_count; --sys_count >= min_sys_count;)
index 662fb7d58c8fa4253c93d36d3d317d138402d52b..96f93d85e5612d9b20b2e28c31c6cb056d3a0d67 100644 (file)
@@ -677,9 +677,13 @@ Page_breaking::space_systems_on_n_or_one_more_pages (vsize configuration, vsize
   else
     {
       cache_line_details (configuration);
+
+      vsize min_p_count = min_page_count (configuration, first_page_num);
       Page_spacer ps (cached_line_details_, first_page_num, this);
-      n_res = ps.solve (n);
-      m_res = ps.solve (n+1);
+      if (n >= min_p_count)
+       n_res = ps.solve (n);
+      if (n < cached_line_details_.size ())
+       m_res = ps.solve (n+1);
     }
 
   Real penalty = blank_page_penalty ();
index 028a67a9fde4d73e383f1f5fc09f32d5b7d53146..d1545369564ec3cc764c41462c9dc980986a2025 100644 (file)
@@ -99,7 +99,7 @@ Page_spacer::solve (vsize page_count)
         All the systems that don't fit get tacked onto the last page.
       */
       vsize i;
-      for (i = system; isinf (state_.at (i, page_count-1).demerits_) && i--; )
+      for (i = system; isinf (state_.at (i, page_count-1).demerits_) && i; i--)
        ;
 
       if (i)
index 35fc4ec0a5aca8a71d37b7094874cc24978b9509..c3315a3b42c77d830d9b858ca5a1d0f21f35688f 100644 (file)
        (axes . (,Y))
        (Y-extent . ,ly:axis-group-interface::height)
        (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
+       (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
        (meta . ((class . Spanner)
                 (interfaces . (axis-group-interface
                                ))))))