commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9927 - gnuradio/trunk/grc/src/platforms/gui


From: jblum
Subject: [Commit-gnuradio] r9927 - gnuradio/trunk/grc/src/platforms/gui
Date: Mon, 3 Nov 2008 22:33:11 -0700 (MST)

Author: jblum
Date: 2008-11-03 22:33:08 -0700 (Mon, 03 Nov 2008)
New Revision: 9927

Modified:
   gnuradio/trunk/grc/src/platforms/gui/Connection.py
Log:
do not call is_valid within draw

Modified: gnuradio/trunk/grc/src/platforms/gui/Connection.py
===================================================================
--- gnuradio/trunk/grc/src/platforms/gui/Connection.py  2008-11-04 04:45:39 UTC 
(rev 9926)
+++ gnuradio/trunk/grc/src/platforms/gui/Connection.py  2008-11-04 05:33:08 UTC 
(rev 9927)
@@ -59,6 +59,8 @@
                        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 @@
                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)





reply via email to

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