commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/03: grc: fix copy and paste for embedded


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/03: grc: fix copy and paste for embedded python blocks
Date: Sun, 24 Apr 2016 19:19:35 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit fe6abd5ffb90f97e300a93e26f976b4053247062
Author: Sebastian Koslowski <address@hidden>
Date:   Mon Apr 18 13:15:17 2016 +0200

    grc: fix copy and paste for embedded python blocks
---
 grc/gui/FlowGraph.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 63fd841..f315431 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]