[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 07/08: grc: fix lagging drag and drop, roun
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 07/08: grc: fix lagging drag and drop, round two |
Date: |
Wed, 1 Oct 2014 19:32:59 +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 ca4d8ff0c4efb685cfd4b13a33f6640cc7e44fa1
Author: Sebastian Koslowski <address@hidden>
Date: Wed Oct 1 21:01:31 2014 +0200
grc: fix lagging drag and drop, round two
---
grc/base/Port.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/grc/base/Port.py b/grc/base/Port.py
index 34766bb..761369d 100644
--- a/grc/base/Port.py
+++ b/grc/base/Port.py
@@ -38,6 +38,8 @@ class Port(Element):
self._type = n['type']
self._hide = n.find('hide') or ''
self._dir = dir
+ self._type_evaluated = '' # updated on rewrite()
+ self._hide_evaluated = False # updated on rewrite()
def validate(self):
"""
@@ -48,6 +50,13 @@ class Port(Element):
if self.get_type() not in self.get_types():
self.add_error_message('Type "%s" is not a possible
type.'%self.get_type())
+ def rewrite(self):
+ """resolve dependencies in for type and hide"""
+ Element.rewrite(self)
+ self._type_evaluated =
self.get_parent().resolve_dependencies(self._type)
+ hide =
self.get_parent().resolve_dependencies(self._hide).strip().lower()
+ self._hide_evaluated = False if hide in ('false', 'off', '0') else
bool(hide)
+
def __str__(self):
if self.is_source():
return 'Source - %s(%s)'%(self.get_name(), self.get_key())
@@ -73,10 +82,8 @@ class Port(Element):
def get_key(self): return self._key
def is_sink(self): return self._dir == 'sink'
def is_source(self): return self._dir == 'source'
- def get_type(self): return
self.get_parent().resolve_dependencies(self._type)
- def get_hide(self):
- value =
self.get_parent().resolve_dependencies(self._hide).strip().lower()
- return False if value in ('false', 'off', '0') else bool(value)
+ def get_type(self): return self._type_evaluated
+ def get_hide(self): return self._hide_evaluated
def get_connections(self):
"""
- [Commit-gnuradio] [gnuradio] branch maint updated (ff7e74b -> 1edeff1), git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'gnuradio-wg-grc/maint_grcwg' into maint, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 06/08: grc: fix missing xterm (Bug #725), git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 01/08: grc: yet another py26 incompatibility, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 07/08: grc: fix lagging drag and drop, round two,
git <=
- [Commit-gnuradio] [gnuradio] 03/08: grc: update all flowgraphs when hiding port labels, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 05/08: grc: fix lagging drag and drop, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 02/08: grc: fix search entry box for old PyGTK versions, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 04/08: grc: no icon in search entry box for old PyGTK versions, git, 2014/10/01