summaryrefslogtreecommitdiff
path: root/grc/gui/Port.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2014-08-20 10:34:08 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2014-08-20 10:34:08 -0700
commit9e9699b4c1e76d6d699d7c199775f3d8e134d5e5 (patch)
tree4989c9dc49800642ae57ed72c9670ad72c79c843 /grc/gui/Port.py
parent84ce73af3dca41b8acec6d59fca65901e1fe0045 (diff)
parent00709699b217bc6b6b866ffad6d9a8c1e9497ae8 (diff)
Merge remote-tracking branch 'gnuradio-wg-grc/grc_snap_blocks_to_grid'
Diffstat (limited to 'grc/gui/Port.py')
-rw-r--r--grc/gui/Port.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/grc/gui/Port.py b/grc/gui/Port.py
index b81b162f6e..c56432d2b5 100644
--- a/grc/gui/Port.py
+++ b/grc/gui/Port.py
@@ -70,26 +70,26 @@ class Port(Element):
length = len(filter(lambda p: not p.get_hide(), ports))
#reverse the order of ports for these rotations
if rotation in (180, 270): index = length-index-1
- offset = (self.get_parent().H - length*self.H - (length-1)*PORT_SEPARATION)/2
+ offset = (self.get_parent().H - (length-1)*PORT_SEPARATION - self.H)/2
#create areas and connector coordinates
if (self.is_sink() and rotation == 0) or (self.is_source() and rotation == 180):
x = -1*W
- y = (PORT_SEPARATION+self.H)*index+offset
+ y = PORT_SEPARATION*index+offset
self.add_area((x, y), (W, self.H))
self._connector_coordinate = (x-1, y+self.H/2)
elif (self.is_source() and rotation == 0) or (self.is_sink() and rotation == 180):
x = self.get_parent().W
- y = (PORT_SEPARATION+self.H)*index+offset
+ y = PORT_SEPARATION*index+offset
self.add_area((x, y), (W, self.H))
self._connector_coordinate = (x+1+W, y+self.H/2)
elif (self.is_source() and rotation == 90) or (self.is_sink() and rotation == 270):
y = -1*W
- x = (PORT_SEPARATION+self.H)*index+offset
+ x = PORT_SEPARATION*index+offset
self.add_area((x, y), (self.H, W))
self._connector_coordinate = (x+self.H/2, y-1)
elif (self.is_sink() and rotation == 90) or (self.is_source() and rotation == 270):
y = self.get_parent().W
- x = (PORT_SEPARATION+self.H)*index+offset
+ x = PORT_SEPARATION*index+offset
self.add_area((x, y), (self.H, W))
self._connector_coordinate = (x+self.H/2, y+1+W)
#the connector length