diff options
author | jcorgan | 2009-04-17 17:24:17 +0000 |
---|---|---|
committer | jcorgan | 2009-04-17 17:24:17 +0000 |
commit | f0282d9fdf1a5e18aa4f1717843befe4d147ffb7 (patch) | |
tree | 49b0527feb2c0320467e15cca8d2847dc0f524e8 /gnuradio-core/src/lib | |
parent | 0c263e9d119ba94038679b172f4241f9d9dd7d59 (diff) | |
download | gnuradio-f0282d9fdf1a5e18aa4f1717843befe4d147ffb7.tar.gz gnuradio-f0282d9fdf1a5e18aa4f1717843befe4d147ffb7.tar.bz2 gnuradio-f0282d9fdf1a5e18aa4f1717843befe4d147ffb7.zip |
Fixes ticket:374
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10865 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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); } |