From f0282d9fdf1a5e18aa4f1717843befe4d147ffb7 Mon Sep 17 00:00:00 2001 From: jcorgan Date: Fri, 17 Apr 2009 17:24:17 +0000 Subject: Fixes ticket:374 git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10865 221aa14e-8319-0410-a670-987f0aec2ac5 --- gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnuradio-core/src/lib') diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc index 123d5c3cd..c6cbd5b31 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc @@ -76,6 +76,14 @@ gr_hier_block2_detail::connect(gr_basic_block_sptr block) throw std::invalid_argument(msg.str()); } + gr_hier_block2_sptr hblock(cast_to_hier_block2_sptr(block)); + + if (hblock && hblock.get() != d_owner) { + if (GR_HIER_BLOCK2_DETAIL_DEBUG) + std::cout << "connect: block is hierarchical, setting parent to " << this << std::endl; + hblock->d_detail->d_parent_detail = this; + } + d_blocks.push_back(block); } -- cgit