From 2ec57a634878c1aaa4a64d60b7b284ba87fd3890 Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Wed, 5 May 2021 09:14:00 +0200 Subject: [PATCH] [toolchaineditor] Fix warnings the tests showed --- beat/editor/widgets/toolchaineditor.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/beat/editor/widgets/toolchaineditor.py b/beat/editor/widgets/toolchaineditor.py index e56a6141..248d1daa 100644 --- a/beat/editor/widgets/toolchaineditor.py +++ b/beat/editor/widgets/toolchaineditor.py @@ -231,7 +231,7 @@ class InputPin(BasePin): * self.block_object.pin_height ) - rect = QRectF(QRect(x, y, width, height)) + rect = QRectF(x, y, width, height) return rect @@ -267,7 +267,7 @@ class OutputPin(BasePin): * self.block_object.pin_height ) - rect = QRectF(QRect(x, y, width, height)) + rect = QRectF(x, y, width, height) return rect @@ -1050,8 +1050,7 @@ class Block(QGraphicsObject): self.custom_height = ( text_height + self.height + max_pin_height * self.pin_height ) - rect = QRect(0, -text_height, self.custom_width, self.custom_height) - rect = QRectF(rect) + rect = QRectF(0, -text_height, self.custom_width, self.custom_height) return rect def draw_pins_name(self, painter, _type, data, offset): @@ -1367,7 +1366,7 @@ class ToolchainView(QGraphicsView): min_y = min(y_list) + block.boundingRect().y() max_width = max(x_list) + max(width_list) - min_x max_height = max(y_list) + max(height_list) - min_y - rect = QRectF(QRect(min_x, min_y, max_width, max_height)) + rect = QRectF(min_x, min_y, max_width, max_height) toolchain_focus = rect else: toolchain_focus = self.scene().itemsBoundingRect() -- GitLab