summaryrefslogtreecommitdiff
path: root/lily/engraver-group.cc
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2016-04-25 17:20:30 +0200
committerDavid Kastrup <dak@gnu.org>2016-05-02 20:29:02 +0200
commitf947f7e126ccaaea212a7e65ed458a05555c771e (patch)
tree231d16a2e66086966a3205971ce6911b05a0a545 /lily/engraver-group.cc
parent07320557cd246fd3f4837f15b4f80b098f048981 (diff)
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.
Diffstat (limited to 'lily/engraver-group.cc')
-rw-r--r--lily/engraver-group.cc17
1 files changed, 7 insertions, 10 deletions
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);