From cd55ac66ee44e50cf91eaa82e6d459e5c5b1dea3 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 16 May 2006 12:36:54 +0000 Subject: [PATCH] * lily/context.cc (internal_send_stream_event): thinko fix. * lily/tie.cc (set_default_control_points): robustness fix. --- ChangeLog | 4 ++++ lily/context.cc | 12 ++++++------ lily/music.cc | 2 +- lily/tie.cc | 14 ++++++++------ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a83f27d01..87bd1a7f02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-05-16 Han-Wen Nienhuys + * 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. diff --git a/lily/context.cc b/lily/context.cc index 7ab871b15e..3eef6e51ea 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -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 (); } diff --git a/lily/music.cc b/lily/music.cc index 5bd573dab0..02a9876b1c 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -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 * diff --git a/lily/tie.cc b/lily/tie.cc index d11153aaab..3f282071e7 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -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, -- 2.39.2