Fix T96255: Node socket fails to drag
This is a general issue exposed by moving from tweak to click-drag events [0], however this bug would have existed for both click & click-drag events beforehand. Since [1] the following behavior could occur: - Click-drag the cursor away from the button. - Leaving the button would flag it as disabled. - The disabled button would then break causing the event to be considered handled. - Once handled no click / click-drag action would be tested. The bug would only happen if the cursor left the button before the drag threshold was reached which tended to happen with an UI-scale 2 or more. Or with an increased drag threshold. Revert [1] (fix for T78503), which is no longer needed since as of [2]. [0]:4986f71848
[1]:6f96dd8576
[2]:87c13ac68c
This commit is contained in:
parent
c4ce1b70e3
commit
fb87578698
Notes:
blender-bot
2023-02-14 10:09:24 +01:00
Referenced by issue #96380, Size pressure not working properly while two Blender windows are open Referenced by issue #96255, Node socket click detection is broken in some cases
|
@ -7969,7 +7969,16 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
|
|||
}
|
||||
|
||||
if (but->flag & UI_BUT_DISABLED) {
|
||||
return WM_UI_HANDLER_BREAK;
|
||||
/* It's important to continue here instead of breaking since breaking causes the event to be
|
||||
* considered "handled", preventing further click/drag events from being generated.
|
||||
*
|
||||
* An example of where this is needed is dragging node-sockets, where dragging a node-socket
|
||||
* could exit the button before the drag threshold was reached, disable the button then break
|
||||
* handling of the #MOUSEMOVE event preventing the socket being dragged entirely, see: T96255.
|
||||
*
|
||||
* Region level event handling is responsible for preventing events being passed
|
||||
* through to parts of the UI that are logically behind this button, see: T92364. */
|
||||
return WM_UI_HANDLER_CONTINUE;
|
||||
}
|
||||
|
||||
switch (but->type) {
|
||||
|
|
Loading…
Reference in New Issue