The setSelectionArea() API changed in PySide6 6.7 - it now requires
an ItemSelectionOperation parameter before ItemSelectionMode.
Files added:
- patches/nodegraphqt_pyside6_compat.patch: Git-style patch file
- patches/UPSTREAM_ISSUE.md: Issue report for upstream project
- scripts/patch_nodegraphqt.py: Script to auto-apply the patch
The patch fixes rubber band selection errors when dragging in the
node graph viewer. Run after pip install:
python scripts/patch_nodegraphqt.py
Co-Authored-By: Claude Opus 4.5 <[email protected]>
14 lines
625 B
Diff
14 lines
625 B
Diff
--- a/NodeGraphQt/widgets/viewer.py
|
|
+++ b/NodeGraphQt/widgets/viewer.py
|
|
@@ -521,8 +521,10 @@ class NodeViewer(QtWidgets.QGraphicsView):
|
|
path = QtGui.QPainterPath()
|
|
path.addRect(map_rect)
|
|
self._rubber_band.setGeometry(rect)
|
|
+ # PySide6 6.7+ requires ItemSelectionOperation parameter
|
|
self.scene().setSelectionArea(
|
|
- path, QtCore.Qt.IntersectsItemShape
|
|
+ path, QtCore.Qt.ReplaceSelection,
|
|
+ QtCore.Qt.IntersectsItemShape
|
|
)
|
|
self.scene().update(map_rect)
|