Fix T72089: Image Editor - Paint mode, Clone Tool - disfunctional clear

button in the Image slot in the Brush panel

Caused/exposed by rBaf9ca138ba7b
Also relevant was rB828905190e12

Above commits moved the WM_UI_HANDLER_BREAK around so it would not be
returned anymore.
We need WM_UI_HANDLER_BREAK, otherwise we wont get through to to
KM_RELEASE. There are two places that explicitly check for KM_RELEASE
(call to `ui_do_but_extra_operator_icon` in both
`ui_do_but_SEARCH_UNLINK` / `ui_do_button`), and without the above we
only ever get here with KM_PRESS.

This patch restores the behavior regarding WM_UI_HANDLER_BREAK to what
is was before the two culprit commits.

Checked that both this report (T72089) and T69755 are working.

Maniphest Tasks: T72089

Differential Revision: https://developer.blender.org/D6363
This commit is contained in:
Philipp Oeser 2019-12-05 01:32:23 +01:00
parent 8410aa2684
commit 9c062ac310
Notes: blender-bot 2023-05-29 09:17:12 +02:00
Referenced by issue #72089, Image Editor - Paint mode, Clone Tool - disfunctional clear button in the Image slot in the Brush panel
1 changed files with 4 additions and 2 deletions

View File

@ -4360,8 +4360,10 @@ static int ui_do_but_TEX(
else if (but->dt == UI_EMBOSS_NONE && !event->ctrl) {
/* pass */
}
else if (!ui_but_extra_operator_icon_mouse_over_get(but, data, event)) {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
else {
if (!ui_but_extra_operator_icon_mouse_over_get(but, data, event)) {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
}
return WM_UI_HANDLER_BREAK;
}
}