[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9994 - gnuradio/trunk/grc/src/platforms/gui
From: |
jblum |
Subject: |
[Commit-gnuradio] r9994 - gnuradio/trunk/grc/src/platforms/gui |
Date: |
Fri, 14 Nov 2008 17:23:28 -0700 (MST) |
Author: jblum
Date: 2008-11-14 17:23:27 -0700 (Fri, 14 Nov 2008)
New Revision: 9994
Modified:
gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py
Log:
only change id if not unique
Modified: gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py
===================================================================
--- gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py 2008-11-14 21:18:01 UTC
(rev 9993)
+++ gnuradio/trunk/grc/src/platforms/gui/FlowGraph.py 2008-11-15 00:23:27 UTC
(rev 9994)
@@ -140,7 +140,6 @@
for block_n in blocks_n:
block_key = block_n['key']
if block_key == 'options': continue
- block_id = self._get_unique_id(block_key)
block = self.get_new_block(block_key)
selected.add(block)
#set params
@@ -151,7 +150,9 @@
#setup id parameter
if param_key == 'id':
old_id2block[param_value] = block
- param_value = block_id
+ #if the block id is not unique, get a
new block id
+ if param_value in [block.get_id() for
block 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)
#move block to offset coordinate
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9994 - gnuradio/trunk/grc/src/platforms/gui,
jblum <=