diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-04-18 13:15:17 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-04-18 14:45:58 +0200 |
commit | fe6abd5ffb90f97e300a93e26f976b4053247062 (patch) | |
tree | 8de77811a2242bfe64f5f24b7c6aa141127c31c8 /grc/gui/FlowGraph.py | |
parent | e60a0fed0ce8b25df2a9c94d7ec12debfa3347db (diff) |
grc: fix copy and paste for embedded python blocks
Diffstat (limited to 'grc/gui/FlowGraph.py')
-rw-r--r-- | grc/gui/FlowGraph.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index 63fd841218..f315431c57 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -195,6 +195,8 @@ class FlowGraph(Element): continue # unknown block was pasted (e.g. dummy block) selected.add(block) #set params + if block_key == 'epy_block': + block.rewrite() params_n = block_n.findall('param') for param_n in params_n: param_key = param_n.find('key') @@ -203,7 +205,7 @@ class FlowGraph(Element): if param_key == 'id': old_id2block[param_value] = block #if the block id is not unique, get a new block id - if param_value in [bluck.get_id() for bluck in self.get_blocks()]: + if param_value in [blk.get_id() for blk in self.get_blocks()]: param_value = self._get_unique_id(param_value) #set value to key block.get_param(param_key).set_value(param_value) @@ -285,7 +287,7 @@ class FlowGraph(Element): """ for selected_block in self.get_selected_blocks(): delta_coordinate = selected_block.bound_move_delta(delta_coordinate) - + for selected_block in self.get_selected_blocks(): selected_block.move(delta_coordinate) self.element_moved = True |