|
1 | 1 | #!/usr/bin/python |
2 | | -from Qt import QtGui, QtCore, QtWidgets |
| 2 | +from Qt import QtCore, QtGui, QtWidgets |
3 | 3 |
|
4 | 4 | from NodeGraphQt.constants import Z_VAL_BACKDROP, NodeEnum |
5 | 5 | from NodeGraphQt.qgraphics.node_abstract import AbstractNodeItem |
@@ -79,10 +79,12 @@ def paint(self, painter, option, widget): |
79 | 79 |
|
80 | 80 | margin = 1.0 |
81 | 81 | rect = self.boundingRect() |
82 | | - rect = QtCore.QRectF(rect.left() + margin, |
83 | | - rect.top() + margin, |
84 | | - rect.width() - (margin * 2), |
85 | | - rect.height() - (margin * 2)) |
| 82 | + rect = QtCore.QRectF( |
| 83 | + rect.left() + margin, |
| 84 | + rect.top() + margin, |
| 85 | + rect.width() - (margin * 2), |
| 86 | + rect.height() - (margin * 2), |
| 87 | + ) |
86 | 88 |
|
87 | 89 | item = self.parentItem() |
88 | 90 | if item and item.selected: |
@@ -159,6 +161,7 @@ def mouseReleaseEvent(self, event): |
159 | 161 | def on_sizer_pos_changed(self, pos): |
160 | 162 | self._width = pos.x() + self._sizer.size |
161 | 163 | self._height = pos.y() + self._sizer.size |
| 164 | + self.update() |
162 | 165 |
|
163 | 166 | def on_sizer_pos_mouse_release(self): |
164 | 167 | size = { |
@@ -189,10 +192,12 @@ def paint(self, painter, option, widget): |
189 | 192 |
|
190 | 193 | margin = 1.0 |
191 | 194 | rect = self.boundingRect() |
192 | | - rect = QtCore.QRectF(rect.left() + margin, |
193 | | - rect.top() + margin, |
194 | | - rect.width() - (margin * 2), |
195 | | - rect.height() - (margin * 2)) |
| 195 | + rect = QtCore.QRectF( |
| 196 | + rect.left() + margin, |
| 197 | + rect.top() + margin, |
| 198 | + rect.width() - (margin * 2), |
| 199 | + rect.height() - (margin * 2), |
| 200 | + ) |
196 | 201 |
|
197 | 202 | radius = 2.6 |
198 | 203 | color = (self.color[0], self.color[1], self.color[2], 50) |
|
0 commit comments