Skip to content

Show the resize cursor only for resizable nodes - #559

Merged
paceholder merged 1 commit into
masterfrom
fix-resize-cursor
Nov 23, 2026
Merged

paceholder merged 1 commit into
masterfrom
fix-resize-cursor

Conversation

@paceholder

Copy link
Copy Markdown
Owner

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation/refactoring

Description

NodeGraphicsObject::hoverMoveEvent() tested the node flags with | instead of &. flags | NodeFlag::Resizable is never zero, so the condition was true for every node. A node that is not resizable showed the resize cursor over its resize handle. Resizing itself was not affected: the mouse press already checks with &.

One character changes. There is no new test, by decision. I checked it by hand in a real view with simulated mouse moves over the resize handle:

Source Not resizable Resizable
before resize cursor (the bug) resize cursor
after arrow cursor resize cursor

The handle is a 7x7 pixel square near the bottom-right corner. The painter draws it only for resizable nodes, so on a non-resizable node nothing shows where it is.

Testing

  • Qt version tested: Qt 6.12.0, macOS arm64 (Apple Clang), offscreen platform for the suite
  • Existing tests still pass (897 assertions in 85 test cases)
  • Added tests for new functionality (not added, see above)

Breaking changes?

No.

Related issue

Fixes #383

hoverMoveEvent() tested the node flags with | instead of &, so the
condition was true for every node. A node that is not resizable showed
the resize cursor over its resize handle. Resizing itself was already
checked with &.

Fixes #383
@paceholder
paceholder merged commit 904f440 into master Nov 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant