Skip to content

Commit 25baae0

Browse files
committed
clean up
1 parent 0ce598b commit 25baae0

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

NodeGraphQt/qgraphics/node_base.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,13 @@ def calc_size(self):
290290
"""
291291
width = 0.0
292292
if self._widgets:
293-
widget_widths = [
294-
w.boundingRect().width() for w in self._widgets.values()]
295-
width = max(widget_widths)
293+
width = max([
294+
w.boundingRect().width() for w in self._widgets.values()
295+
])
296296

297297
lbl_width = self._text_item.boundingRect().width()
298-
width = lbl_width if lbl_width > width else width
298+
if lbl_width > width:
299+
width = lbl_width
299300

300301
port_height = 0.0
301302
if self._input_items:

NodeGraphQt/qgraphics/port.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ def paint(self, painter, option, widget):
5353
widget (QtWidgets.QWidget): not used.
5454
"""
5555
painter.save()
56-
57-
rect = QtCore.QRectF(0.0, 0.8, self._width, self._height)
58-
path = QtGui.QPainterPath()
59-
path.addEllipse(rect)
60-
6156
if self._hovered:
6257
color = QtGui.QColor(*PORT_HOVER_COLOR)
6358
border_color = QtGui.QColor(*PORT_HOVER_BORDER_COLOR)
@@ -94,7 +89,6 @@ def paint(self, painter, option, widget):
9489
self.boundingRect().center().y() - h / 2,
9590
w, h)
9691
painter.drawEllipse(rect)
97-
9892
painter.restore()
9993

10094
def itemChange(self, change, value):

0 commit comments

Comments
 (0)