Fix T83177: Industry Compatible keymap: MMB-dragging to transform engages axis-constraining on release
With rBc0677b662f4b, we try to track all modal events in order to detect the one corresponding to the release. But modifier keys can mask the modal event and thus confirm realease ends up being skipped. This resulted in the T83387. With this commit we now read the actual key drop value in the modal event. This fixes T83387
This commit is contained in:
parent
2de49d1ff7
commit
6fda30cc54
Notes:
blender-bot
2023-02-14 04:39:18 +01:00
Referenced by issue #84473, Duplicating an object or mesh geometry quickly followed by a MMB gesture locks to wrong axis. Referenced by issue #83387, MMB Tweak(Move, Scale, Rotate) with CTRL(to enable snapping) continues to work upon releasing. Referenced by issue #83177, Industry Compatible keymap: MMB-dragging to transform engages axis-constraining on release
|
@ -1082,7 +1082,12 @@ int transformEvent(TransInfo *t, const wmEvent *event)
|
|||
break;
|
||||
case TFM_MODAL_AUTOCONSTRAINT:
|
||||
case TFM_MODAL_AUTOCONSTRAINTPLANE:
|
||||
if ((t->flag & T_NO_CONSTRAINT) == 0) {
|
||||
if ((t->flag & T_RELEASE_CONFIRM) && (event->prevval == KM_RELEASE) &&
|
||||
event->prevtype == t->launch_event) {
|
||||
/* Confirm transform if launch key is released after mouse move. */
|
||||
t->state = TRANS_CONFIRM;
|
||||
}
|
||||
else if ((t->flag & T_NO_CONSTRAINT) == 0) {
|
||||
if (t->modifiers & (MOD_CONSTRAINT_SELECT | MOD_CONSTRAINT_PLANE)) {
|
||||
/* Confirm. */
|
||||
postSelectConstraint(t);
|
||||
|
|
Loading…
Reference in New Issue