]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/book.cc
Tracker 836: Add facility to change output file-name for a \book block
[lilypond.git] / lily / book.cc
index fa961d36f3ace94ce618565ab9c60aa9aef7235b..86eeda1b39061207c2a4c02ad2bdabaa699d1f13 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "book.hh"
@@ -127,8 +127,8 @@ Book::set_parent (Book *parent)
       paper_->unprotect ();
     }
   paper_->parent_ = parent->paper_;
-  /* If this part is the first child of parent, copy its header */
-  if (ly_is_module (parent->header_) && (scm_is_null (parent->bookparts_)))
+  /* Copy the header block of the parent */
+  if (ly_is_module (parent->header_))
     {
       SCM tmp_header = ly_make_anonymous_module (false);
       ly_module_copy (tmp_header, parent->header_);
@@ -268,6 +268,7 @@ Book::process (Output_def *default_paper,
       paper_book->paper_->parent_ = parent_part->paper_;
     }
   paper_book->header_ = header_;
+  scaled_bookdef->unprotect ();
 
   if (scm_is_pair (bookparts_))
     {
@@ -276,6 +277,7 @@ Book::process (Output_def *default_paper,
     }
   else
     {
+      paper_book->paper_->normalize ();
       /* Process scores */
   /* Render in order of parsing.  */
       for (SCM s = scm_reverse (scores_); scm_is_pair (s); s = scm_cdr (s))