From f947f7e126ccaaea212a7e65ed458a05555c771e Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 25 Apr 2016 17:20:30 +0200 Subject: Issue 4834: Remove routing information from Grob_info Routing information manages how to pass information to acknowledgers but should not reach the acknowledgers themselves. Moving this information into arguments for the various kinds of announce_grob procedures is cleaner and allows to bounce Grob_info through Scheme without the danger of information loss. --- lily/engraver-group.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'lily/engraver-group.cc') diff --git a/lily/engraver-group.cc b/lily/engraver-group.cc index cf1832fe1f..35c14d460d 100644 --- a/lily/engraver-group.cc +++ b/lily/engraver-group.cc @@ -92,16 +92,13 @@ Engraver_group::disconnect_from_context () } void -Engraver_group::announce_grob (Grob_info info) +Engraver_group::announce_grob (Grob_info info, Direction dir, + Context *reroute_context) { - announce_infos_.push_back (info); + announce_infos_.push_back (Announce_grob_info (info, dir)); - Context *dad_con = context_->get_parent_context (); - if (info.rerouting_daddy_context_) - { - dad_con = info.rerouting_daddy_context_; - info.rerouting_daddy_context_ = 0; - } + Context *dad_con = reroute_context ? reroute_context + : context_->get_parent_context (); Engraver_group *dad_eng = dad_con @@ -109,7 +106,7 @@ Engraver_group::announce_grob (Grob_info info) : 0; if (dad_eng) - dad_eng->announce_grob (info); + dad_eng->announce_grob (info, dir); } void @@ -122,7 +119,7 @@ Engraver_group::acknowledge_grobs () for (vsize j = 0; j < announce_infos_.size (); j++) { - Grob_info info = announce_infos_[j]; + Announce_grob_info info = announce_infos_[j]; SCM meta = info.grob ()->get_property ("meta"); SCM nm = scm_assoc (name_sym, meta); -- cgit v1.2.3