From 82f0028ebc5e0925f53b26574dd18702a0d38947 Mon Sep 17 00:00:00 2001 From: Johnny Chan Date: Tue, 22 Aug 2023 15:47:03 +1200 Subject: [PATCH] bug fixes. --- .../properties_bin/node_property_widgets.py | 17 +++++++++-------- NodeGraphQt/widgets/scene.py | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py b/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py index c04d5291..1e113cbc 100644 --- a/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py +++ b/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py @@ -755,16 +755,17 @@ def add_node(self, node): prop_widget.property_closed.connect(self.__on_prop_close) prop_widget.property_changed.connect(self.__on_property_widget_changed) port_connections = prop_widget.get_port_connection_widget() - port_connections.input_group.clicked.connect( - lambda v: self.__on_port_tree_visible_changed( - prop_widget.node_id(), v, port_connections.input_tree + if port_connections: + port_connections.input_group.clicked.connect( + lambda v: self.__on_port_tree_visible_changed( + prop_widget.node_id(), v, port_connections.input_tree + ) ) - ) - port_connections.output_group.clicked.connect( - lambda v: self.__on_port_tree_visible_changed( - prop_widget.node_id(), v, port_connections.output_tree + port_connections.output_group.clicked.connect( + lambda v: self.__on_port_tree_visible_changed( + prop_widget.node_id(), v, port_connections.output_tree + ) ) - ) self._prop_list.setCellWidget(0, 0, prop_widget) diff --git a/NodeGraphQt/widgets/scene.py b/NodeGraphQt/widgets/scene.py index 91e7ccfa..eb6fa3a5 100644 --- a/NodeGraphQt/widgets/scene.py +++ b/NodeGraphQt/widgets/scene.py @@ -106,7 +106,7 @@ def drawBackground(self, painter, rect): painter, rect, pen, ViewerEnum.GRID_SIZE.value ) - color = QtGui.QColor(*self._bg_color).darker(150) + color = QtGui.QColor(*self._bg_color).darker(200) if zoom < -0.0: color = color.darker(100 - int(zoom * 110)) pen = QtGui.QPen(color, 0.65)