Commit 4ae1dcca authored by Flavio TARSETTI's avatar Flavio TARSETTI

[widgets][toolchaineditor] patch pins alignement

parent 35bd358f
......@@ -191,7 +191,7 @@ class InputPin(BasePin):
x = -(width / 2.0)
y = (
self.block_object.height
+ self.block_object.inputs.index(self.pin) * self.block_object.height
+ self.block_object.inputs.index(self.pin) * self.block_object.pin_height
)
rect = QRectF(QRect(x, y, width, height))
......@@ -213,7 +213,7 @@ class OutputPin(BasePin):
x = self.block_object.custom_width - (width / 2.0)
y = (
self.block_object.height
+ self.block_object.outputs.index(self.pin) * self.block_object.height
+ self.block_object.outputs.index(self.pin) * self.block_object.pin_height
)
rect = QRectF(QRect(x, y, width, height))
......@@ -530,6 +530,10 @@ class Block(QGraphicsObject):
else:
max_pin_height = 0
if max_pin_height == 0:
self.custom_width = 55
self.height = 55
rect = QRect(
0,
-text_height,
......@@ -611,6 +615,10 @@ class Block(QGraphicsObject):
self.border_pen.setWidth(0)
painter.setPen(self.border_pen)
if max_pin_height == 0:
self.custom_width = 55
self.height = 55
painter.drawRoundedRect(
0,
0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment