diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-12-04 16:49:45 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-12-04 16:49:58 +0300 |
commit | 6fda30cc54d24730d81b96b2e3b542bf94f52137 (patch) | |
tree | 7df3df12b1106ea8ea7b49d084b23439ba6ec0f4 /source | |
parent | 2de49d1ff7e2ea5e632aaaabb3664d6cf6210153 (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index bba0b750d0c..3b8f7f90edc 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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); |