]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/context.cc (internal_send_stream_event): thinko fix.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 May 2006 12:36:54 +0000 (12:36 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 16 May 2006 12:36:54 +0000 (12:36 +0000)
* lily/tie.cc (set_default_control_points): robustness fix.

ChangeLog
lily/context.cc
lily/music.cc
lily/tie.cc

index 1a83f27d01a6bf1e52cc36ab4b9c9a247fbf05a8..87bd1a7f0242f9c20b5177513978f5cfc9166e4b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-05-16  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * lily/context.cc (internal_send_stream_event): thinko fix.
+
+       * lily/tie.cc (set_default_control_points): robustness fix.
+
        * python/musicxml.py (Part.interpret): don't complain about
        incomplete measures.
 
index 7ab871b15ec9b033e4e55b40216666ffa671af7b..3eef6e51ea9e22105ca3d4799271ff124fcdc1e9 100644 (file)
@@ -262,7 +262,8 @@ Context::create_context (Context_def *cdef,
                      ly_symbol2scm ("unique"), scm_int2num (unique),
                      ly_symbol2scm ("ops"), ops,
                      ly_symbol2scm ("type"), cdef->get_context_name (),
-                     ly_symbol2scm ("id"), scm_makfrom0str (id.c_str ()));
+                     ly_symbol2scm ("id"), scm_makfrom0str (id.c_str ()),
+                    0);
 
   return new_context;
 }
@@ -349,11 +350,10 @@ void
 Context::internal_send_stream_event (SCM type, SCM props[])
 {
   Stream_event *e = new Stream_event (this, type);
-  for (int i = 0; props[i]; i++)
-  {
-    assert(props[i+1]);
-    e->internal_set_property (props[i], props[i+1]);
-  }
+  for (int i = 0; props[i]; i += 2)
+    {
+      e->internal_set_property (props[i], props[i+1]);
+    }
   event_source_->broadcast (e);
   e->unprotect ();
 }
index 5bd573dab00519ee22f18a12a549890761a66ffa..02a9876b1c2f6779f1df43b5ff11b63170bf4293 100644 (file)
@@ -240,7 +240,7 @@ void
 Music::send_to_context (Context *c)
 {
   send_stream_event (c, "MusicEvent",
-                    ly_symbol2scm("music"), self_scm ());
+                    ly_symbol2scm("music"), self_scm (), 0);
 }
 
 Music *
index d11153aaab654981e13c48e1befd8bf2303e664c..3f282071e77fe393bad531df74895ef3a97ef840 100644 (file)
@@ -162,14 +162,16 @@ Tie::set_default_control_points (Grob *me_grob)
   Tie_specification spec = problem.get_tie_specification (0);
   spec.has_manual_dir_ = true;
   spec.manual_dir_ = get_grob_direction (me);
+
+  if (me->is_live ())
+    {
+      Tie_configuration conf
+       = problem.find_optimal_tie_configuration (spec);
   
-  Tie_configuration conf
-    = problem.find_optimal_tie_configuration (spec);
-  
-  set_control_points (me, problem.common_x_refpoint (),
-                     conf, problem.details_);
+      set_control_points (me, problem.common_x_refpoint (),
+                         conf, problem.details_);
+    }
 }
-
 void
 Tie::set_control_points (Grob *me,
                         Grob *common,