diff options
author | Josh Blum | 2009-09-05 02:21:37 -0700 |
---|---|---|
committer | Josh Blum | 2009-09-05 02:21:37 -0700 |
commit | fa465d160b0c53fae3ad7876cf429263157dd60a (patch) | |
tree | 12c1b47840f0f4af32ab43d9878fa725d092decf /grc/gui/Port.py | |
parent | 5bb2a70a94be9c0f83712ee259b7125e3a582b08 (diff) | |
download | gnuradio-fa465d160b0c53fae3ad7876cf429263157dd60a.tar.gz gnuradio-fa465d160b0c53fae3ad7876cf429263157dd60a.tar.bz2 gnuradio-fa465d160b0c53fae3ad7876cf429263157dd60a.zip |
Created recursive create labels and shapes method for gui element.
Replaces update methods in the gui classes and simplifies calls.
The master update method in flow graph calls create labels and shapes.
Diffstat (limited to 'grc/gui/Port.py')
-rw-r--r-- | grc/gui/Port.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/grc/gui/Port.py b/grc/gui/Port.py index f8bfefee6..6763f6cbd 100644 --- a/grc/gui/Port.py +++ b/grc/gui/Port.py @@ -42,9 +42,9 @@ class Port(Element): Element.__init__(self) self.connector_coordinates = dict() - def update(self): + def create_shapes(self): """Create new areas and labels for the port.""" - self.clear() + Element.create_shapes(self) #get current rotation rotation = self.get_rotation() #get all sibling ports @@ -82,8 +82,9 @@ class Port(Element): #the connector length self._connector_length = CONNECTOR_EXTENSION_MINIMAL + CONNECTOR_EXTENSION_INCREMENT*index - def _create_labels(self): + def create_labels(self): """Create the labels for the socket.""" + Element.create_labels(self) self._bg_color = Colors.get_color(self.get_color()) #create the layout layout = gtk.DrawingArea().create_pango_layout('') |