paceholder / nodeeditor

Qt Node Editor. Dataflow programming framework
BSD 3-Clause "New" or "Revised" License
2.92k stars 794 forks source link

Incorrect cursor displayed when hovering over a non-resizable node's "resize rect" #383

Open mariusalexander opened 1 year ago

mariusalexander commented 1 year ago

Summary

When hovering over the "resize rect" of a non-resizeable node (bottom right in the default painting style) the cursor changes to Qt::SizeFDiagCursor even tough it is not resizeable.

Potential fix

A quick search led me to the following code snippet:

https://github.com/paceholder/nodeeditor/blob/5465ddc91f1b30823c5fc3def93138cbec4c9394/src/NodeGraphicsObject.cpp#L341-L346

Instead of using a bitwise OR (|) one should use a bitwise AND (&) operation here, since 0x0 | 0x1 (i.e. QtNodes::NoFlags OR QtNodes::Resizable) will always return true.

@ anyone who is reading this and has some spare time feel free to open a PR and apply the fix for me 😇

Kind regards