summaryrefslogtreecommitdiff
path: root/grc/src
diff options
context:
space:
mode:
authorjblum2008-11-04 05:33:08 +0000
committerjblum2008-11-04 05:33:08 +0000
commitb58218aea0738646bb576739779b5c8d0b18ac18 (patch)
tree32d4bf091000ee41f56e7f8262628d5bcb164fd2 /grc/src
parent9c396d3353075919ae76b6f146ed6485b56880c6 (diff)
downloadgnuradio-b58218aea0738646bb576739779b5c8d0b18ac18.tar.gz
gnuradio-b58218aea0738646bb576739779b5c8d0b18ac18.tar.bz2
gnuradio-b58218aea0738646bb576739779b5c8d0b18ac18.zip
do not call is_valid within draw
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9927 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src')
-rw-r--r--grc/src/platforms/gui/Connection.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/grc/src/platforms/gui/Connection.py b/grc/src/platforms/gui/Connection.py
index 44048e181..b130611fb 100644
--- a/grc/src/platforms/gui/Connection.py
+++ b/grc/src/platforms/gui/Connection.py
@@ -59,6 +59,8 @@ class Connection(Element):
Utils.get_rotated_coordinate((-CONNECTOR_ARROW_HEIGHT, CONNECTOR_ARROW_BASE/2), self.get_sink().get_rotation()),
]
self._update_after_move()
+ if self.is_valid(): self._foreground = Colors.FG_COLOR
+ else: self._foreground = Colors.ERROR_COLOR
def _update_after_move(self):
"""Calculate coordinates."""
@@ -123,7 +125,6 @@ class Connection(Element):
fg_color = self.get_enabled() and Colors.FG_COLOR or Colors.DISABLED_FG_COLOR
Element.draw(self, window, FG_color=fg_color)
gc = self.get_gc()
- if self.is_valid(): gc.foreground = Colors.FG_COLOR
- else: gc.foreground = Colors.ERROR_COLOR
+ gc.foreground = self._foreground
#draw arrow on sink port
window.draw_polygon(gc, True, self._arrow)