[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)
- [Commit-gnuradio] [gnuradio] 24/101: grc-refactor: the hopeless cause of bus ports..., (continued)
- [Commit-gnuradio] [gnuradio] 24/101: grc-refactor: the hopeless cause of bus ports..., git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 25/101: Merge branch 'next_grcwg' into gtk3 (v3.7.10 release), git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 34/101: grc: fix parent getter in rewrite_epy_block, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 13/101: grc-refactor: Connections, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 28/101: grc: refactor: block state handling, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 26/101: grc: gtk3: enable block comments, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 12/101: grc-refactor: remove odict, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 36/101: grc: keep list of active ports in core blocks, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 23/101: grc-refactor: make block.params a dict, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 29/101: grc: refactor: block states are no longer hidden params, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 37/101: grc: refactor: fixup selection code and core connection changes,
git <=
- [Commit-gnuradio] [gnuradio] 22/101: grc-refactor: Block: make more public attribs, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 35/101: grc: gtk3: quick fix for file dialogs, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 41/101: grc: gtk3: fix PythonEditorParam widget, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 02/101: gtk3: add flowgraph draw code and other gtk3 fixes (WIP), git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 21/101: grc-refactor: Block: remove key getters, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 31/101: grc: gtk3: refactor connection draw code, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 14/101: grc-refactor: rewrite tree-api in core, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 42/101: grc: gtk3: update main and checks, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 27/101: grc: gtk3: refactor and update draw code WIP, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 33/101: grc: gtk3: update block surface draw code, git, 2017/03/16