Page MenuHome

Fix T97386: Node socket labels swallow click/drag events
ClosedPublic

Authored by Campbell Barton (campbellbarton) on May 12 2022, 6:31 AM.

Details

Summary

Regression caused by [0] which made ui_but_is_interactive consider
label buttons with tool-tips to be interactive. This prevented
the clicks to pass through to the nodes for selecting/dragging.

Resolve this by allowing buttons to be activated for the purpose
of showing tool-tips but otherwise considering them disabled
(as if the UI_BUT_DISABLED is set when handling events).

[0]: 484a9146479e05946d291e9886cdf3febca6d05d


NOTE: before this I tried out a patch that didn't require the button to be active to show it's tool-tip. While this simplifies adding tool-tips for button-types that should show tool-tips without blocking user input it was more intrusive and introduced the possibility that the button used to show the tool-tip different to the one that started the timer would be different. To solve this there could be a way of storing a reference to the button used to start the tool-tip ... however button pointers need to be kept valid which gets more involved so I opted to use the existing method of activating the button (as this patch does). For reference this is the patch that implements the behavior described in this note: P2933.
NOTE: ui_but_find_mouse_over_ex arguments are getting difficult to follow, suggest to take a params struct in a separate cleanup commit.

Diff Detail

Repository
rB Blender
Branch
TEMP-TOOLTIP-FOR-LABEL-FIX-v2 (branched from master)
Build Status
Buildable 22082
Build 22082: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) requested review of this revision.May 12 2022, 6:31 AM
Campbell Barton (campbellbarton) created this revision.
  • Fix Ctrl-Clicking on labels
  • Reorder arguments to group label-edit and for-tooltip arguments.
This revision is now accepted and ready to land.May 13 2022, 3:21 PM