klauer / qtpynodeeditor

Python Qt NodeEditor (qtpy, PyQt5, PySide)
https://klauer.github.io/qtpynodeeditor/
Other
192 stars 54 forks source link

edges/pins/slots move without staying attached to their connected nodes #63

Open hannesdelbeke opened 1 year ago

hannesdelbeke commented 1 year ago

when I move a bunch of nodes, the edges sometimes move without staying attached at the other end to a static node. bad node move

Expected Behavior

the edge/connection would stay attached to the static node that's not moving

Current Behavior

sometimes the edge moves without updating correctly this results in a bad UX

Possible Solution

move the static node a little, to refresh the edge

Steps to Reproduce (for bugs)

not always reproducable, think it's triggered by some kind of middle mouse click / shift combo

  1. shift + RMB to select a bunch of nodes
  2. middle mouse click + move mouse. (try without releasing previous shift key too)
  3. move a selected node with RMB
  4. notice the edges moving

Context

this is using the calculator example python -m qtpynodeeditor.examples.calculator

Your Environment

windows 11 pycharm python 3.10.5 [MSC v.1929 64 bit (AMD64)] on win32 Qt 5.15.2 installed qtpynodeeditor from PyPi

klauer commented 1 year ago

I think this is due to the fact that each node independently tries to redraw its connections, all the while other nodes may be moving. We need a final step that redoes all connections after the user is done dragging nodes around.

I'll put in an attempted fix (well, it won't be worse than master at least) and tag the next bugfix release. If it ends up fixing the issue, we can close this. If not, let me know and I'll revisit.