]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/define-music-types.scm (music-descriptions): add
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 8 Aug 2006 17:06:31 +0000 (17:06 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 8 Aug 2006 17:06:31 +0000 (17:06 +0000)
line-break-event to LineBreakEvent music

* lily/music.cc (to_event): don't crash if music type not set.

* lily/spacing-loose-columns.cc (set_loose_columns): don't barf if
spacing not set.

* lily/spacing-engraver.cc (stop_translation_timestep): set
spacing for proportional notation too.

ChangeLog
lily/music.cc
lily/spacing-engraver.cc
lily/spacing-loose-columns.cc
scm/define-music-types.scm

index 99df8bb3e1655f60ac421a1ed6d26df827ef953a..70b2426249d3e7ff9b2b1d84a03194f090567c4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2006-08-08  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * scm/define-music-types.scm (music-descriptions): add
+       line-break-event to LineBreakEvent music
+
+       * lily/music.cc (to_event): don't crash if music type not set.
+
+       * lily/spacing-loose-columns.cc (set_loose_columns): don't barf if
+       spacing not set.
+
+
+       * lily/spacing-engraver.cc (stop_translation_timestep): set
+       spacing for proportional notation too.
+
        * scm/translation-functions.scm (format-bass-figure): inspect stream-event.
 
        * scripts/lilypond-book.py (bindir): add bindir to $PATH.
@@ -22,7 +34,6 @@
 
        * lily/paper-book.cc (pages): use the new page-breaking calling convention
 
->>>>>>> 1.5227
 2006-08-07  Erik Sandberg  <mandolaerik@gmail.com>
 
        * lily/lexer.ll, lily/source-file.cc: Add \sourcefileline command
index 377551253891f82cf24be6743e42948675c7a395..8a169a217baa4c1031724fe03f2f08bca2eec4aa 100644 (file)
@@ -270,7 +270,10 @@ Music::to_event () const
   SCM class_name = ly_symbol2scm (out);
 
   // catch mistakes.
-  assert (internal_is_music_type (class_name));
+  if (!internal_is_music_type (class_name))
+    {
+      programming_error ("Not a music type");
+    }
 
   Stream_event *e = new Stream_event (class_name, mutable_property_alist_);
   Moment length = get_length ();
index e80f98f1aebfc5e7eeaee4875ba777cf5cfef95d..d544410227cff4d0ef252a933a8a8c0ebf94ea48 100644 (file)
@@ -170,6 +170,10 @@ Spacing_engraver::stop_translation_timestep ()
   Paper_column *musical_column
     = dynamic_cast<Paper_column *> (unsmob_grob (get_property ("currentMusicalColumn")));
 
+  musical_column->set_object ("spacing", spacing_->self_scm ());
+  unsmob_grob (get_property ("currentCommandColumn"))
+    ->set_object ("spacing", spacing_->self_scm ());
+
   SCM proportional = get_property ("proportionalNotationDuration");
   if (unsmob_moment (proportional))
     {
@@ -211,10 +215,6 @@ Spacing_engraver::stop_translation_timestep ()
 
   musical_column->set_property ("shortest-playing-duration", sh);
   musical_column->set_property ("shortest-starter-duration", st);
-
-  musical_column->set_object ("spacing", spacing_->self_scm ());
-  unsmob_grob (get_property ("currentCommandColumn"))
-    ->set_object ("spacing", spacing_->self_scm ());
 }
 
 
index cebabe108476f5f44193d2da82a5296642392771..13a37071c04e69af72df52a1b5f2439241f5085e 100644 (file)
@@ -13,7 +13,7 @@
 #include "staff-spacing.hh"
 #include "note-spacing.hh"
 #include "spacing-spanner.hh"
-
+#include "warn.hh"
 #include "moment.hh"
 
 /* Find the loose columns in POSNS, and drape them around the columns
@@ -88,7 +88,10 @@ set_loose_columns (System *which, Column_x_positions const *posns)
            }
          
          Spacing_options options;
-         options.init_from_grob (spacing);
+         if (spacing)
+           options.init_from_grob (spacing);
+         else
+           programming_error ("Column without spacing object");
 
          bool expand_only = false;
          Real base_note_space = 0.0;
index b20225cfca051f88dee15231500d37e890df4db4..76c113513bba93293187d03aa5ef7f2363394666 100644 (file)
@@ -254,7 +254,7 @@ Syntax: @var{note}\\laissezVibrer.")
     (LineBreakEvent
      . (
        (description .  "Allow, forbid or force a line break.")
-       (types . (general-music break-event event))
+       (types . (general-music line-break-event break-event event))
        ))
     
     (LyricCombineMusic