Add patch for NodeGraphQt PySide6 6.7+ compatibility

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]>
This commit is contained in:
rob
2026-01-15 19:10:10 -04:00
co-authored by Claude Opus 4.5
parent 042be8b49b
commit ad9a59283c
3 changed files with 196 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
--- 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)