UI: allow to cancel editing of vector widgets with escape and RMB
Differential Revision: https://developer.blender.org/D4838
This commit is contained in:
@@ -5622,6 +5622,13 @@ static int ui_do_but_UNITVEC(
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
|
||||
if (event->val == KM_PRESS) {
|
||||
data->cancel = true;
|
||||
data->escapecancel = true;
|
||||
button_activate_state(C, but, BUTTON_STATE_EXIT);
|
||||
}
|
||||
}
|
||||
else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) {
|
||||
button_activate_state(C, but, BUTTON_STATE_EXIT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user