commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 37/101: grc: refactor: fixup selection code


From: git
Subject: [Commit-gnuradio] [gnuradio] 37/101: grc: refactor: fixup selection code and core connection changes
Date: Thu, 16 Mar 2017 14:58:03 +0000 (UTC)

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

jcorgan pushed a commit to branch python3
in repository gnuradio.

commit b479f54903c0b1b164393af2e844723aed8a1072
Author: Sebastian Koslowski <address@hidden>
Date:   Tue Jul 12 17:43:11 2016 +0200

    grc: refactor: fixup selection code and core connection changes
---
 grc/core/Port.py                | 6 +++---
 grc/core/generator/Generator.py | 2 +-
 grc/gui/FlowGraph.py            | 4 +++-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/grc/core/Port.py b/grc/core/Port.py
index 10d021b..ef6a92c 100644
--- a/grc/core/Port.py
+++ b/grc/core/Port.py
@@ -21,7 +21,7 @@ from __future__ import absolute_import
 
 from six.moves import filter
 
-from .Element import Element
+from .Element import Element, lazy_property
 
 from . import Constants
 
@@ -323,11 +323,11 @@ class Port(Element):
             number = str(busses.index(self)) + '#' + 
str(len(self.get_associated_ports()))
         return self._name + number
 
-    @property
+    @lazy_property
     def is_sink(self):
         return self._dir == 'sink'
 
-    @property
+    @lazy_property
     def is_source(self):
         return self._dir == 'source'
 
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index e3f6bf3..637cf9e 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -173,7 +173,7 @@ class TopBlockGenerator(object):
         # Get the virtual blocks and resolve their connections
         virtual = [c for c in connections if 
c.source_block.is_virtual_source()]
         for connection in virtual:
-            source = connection.source.resolve_virtual_source()
+            source = connection.source_port.resolve_virtual_source()
             sink = connection.sink_port
             resolved = fg.parent.Connection(flow_graph=fg, porta=source, 
portb=sink)
             connections.append(resolved)
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 7a0f247..7176594 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -28,6 +28,8 @@ from itertools import count
 import six
 from six.moves import filter
 
+from gi.repository import GObject
+
 from . import Actions, Colors, Utils, Bars, Dialogs
 from .Element import Element
 from .external_editor import ExternalEditor
@@ -435,7 +437,7 @@ class FlowGraph(Element, _Flowgraph):
         selected_elements = self.selected_elements
         elements = self.get_elements()
         # remove deleted elements
-        for selected in selected_elements:
+        for selected in list(selected_elements):
             if selected in elements:
                 continue
             selected_elements.remove(selected)



reply via email to

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