commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 03/08: grc: show detected virtual connectio


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/08: grc: show detected virtual connection loops as errors in GUI"
Date: Thu, 26 Jan 2017 14:46:37 +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 6a3fb6e1432ec3e0e68f11572a62e112436af1dc
Author: Sebastian Koslowski <address@hidden>
Date:   Wed Jan 18 21:29:48 2017 +0100

    grc: show detected virtual connection loops as errors in GUI"
---
 grc/core/Port.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/grc/core/Port.py b/grc/core/Port.py
index da1e016..f740a69 100644
--- a/grc/core/Port.py
+++ b/grc/core/Port.py
@@ -184,7 +184,6 @@ class Port(Element):
         return not self._n['type'] or not 
self.get_parent().resolve_dependencies(self._n['type'])
 
     def validate(self):
-        Element.validate(self)
         if self.get_type() not in self.get_types():
             self.add_error_message('Type "{0}" is not a possible 
type.'.format(self.get_type()))
         platform = self.get_parent().get_parent().get_parent()
@@ -203,10 +202,10 @@ class Port(Element):
         """
         Handle the port cloning for virtual blocks.
         """
+        del self._error_messages[:]
         if self.is_type_empty():
             self.resolve_empty_type()
 
-        Element.rewrite(self)
         hide = 
self.get_parent().resolve_dependencies(self._hide).strip().lower()
         self._hide_evaluated = False if hide in ('false', 'off', '0') else 
bool(hide)
 
@@ -227,6 +226,8 @@ class Port(Element):
         def find_port(finder):
             try:
                 return next((p for p in finder(self) if not 
p.is_type_empty()), None)
+            except LoopError as error:
+                self.add_error_message(str(error))
             except (StopIteration, Exception) as error:
                 pass
 



reply via email to

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