]> git.donarmstrong.com Git - lilypond.git/commitdiff
Ensure non-breakpoints are also non-turnpoints.
authorJoe Neeman <joeneeman@gmail.com>
Thu, 10 Dec 2009 03:56:15 +0000 (19:56 -0800)
committerJoe Neeman <joeneeman@gmail.com>
Fri, 11 Dec 2009 06:50:09 +0000 (22:50 -0800)
lily/page-turn-page-breaking.cc
lily/paper-column-engraver.cc

index 163cdd1fc015f8105ad4b66fd369519c55201dab..c9029cf7b53e649fde6ff4455b468976b9c9117c 100644 (file)
 static bool
 is_break (Grob *g)
 {
-  return scm_is_symbol (g->get_property ("page-turn-permission"));
+  bool turnable = scm_is_symbol (g->get_property ("page-turn-permission"));
+
+  if (turnable &&
+      (!scm_is_symbol (g->get_property ("page-break-permission"))
+       || !scm_is_symbol (g->get_property ("line-break-permission"))))
+    {
+      programming_error ("found a page-turnable place which was not breakable");
+      turnable = false;
+    }
+
+  return turnable;
 }
 
 Page_turn_page_breaking::Page_turn_page_breaking (Paper_book *pb)
index 0ee946131fc4de9f291766f2bedac84695e366f7..bce6febc435a83459b00cbcd992bf7c29869ff36 100644 (file)
@@ -223,6 +223,7 @@ Paper_column_engraver::stop_translation_timestep ()
   if (to_boolean (get_property ("forbidBreak"))
      && breaks_) /* don't honour forbidBreak if it occurs on the first moment of a score */
     {
+      command_column_->set_property ("page-turn-permission", SCM_EOL);
       command_column_->set_property ("page-break-permission", SCM_EOL);
       command_column_->set_property ("line-break-permission", SCM_EOL);
       for (vsize i = 0; i < break_events_.size (); i++)