jchanvfx / NodeGraphQt

Node graph framework that can be re-implemented into applications that supports PySide2
http://chantonic.com/NodeGraphQt/
MIT License
1.26k stars 256 forks source link

Removing nodes with push_undo=False will still use push_undo=True for the deleted connections #290

Closed aloytag closed 1 year ago

aloytag commented 1 year ago

When using delete_node() or remove_node() methods from a NodeGraph instance with the argument push_undo=False, the connections of the deleted node can still be undone. I think that this is solved by changing lines 1205, 1211, 1252 and 1258 in graph.py to:

p.clear_connections(push_undo)

This way, the clear_connections() method of the Port class uses the specified push_undo value. Otherwise, it uses the default push_undo=True.

NodeGraphQt version: 0.5.1 Qt.py version: 1.3.7 PySide2 version: 5.15.2.1 Python version: 3.9.2 OS: Debian GNU/Linux 11 (bullseye)

Regards.

jchanvfx commented 1 year ago

Awesome thanks for catching the bugs @aloytag 😺