Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-11-26 17:42:13 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-11-26 17:42:28 +0300
commit44f5d99cbf872d8b9eead749ca880cbeb9fc0266 (patch)
tree2407416638a0c3a2ab76b7bd64a466f4fcf55d7c /source/blender/editors/transform
parent849debe36c82f4a6bf94eb108de7a2d2fd2e35fb (diff)
Fix T83020: Transform: AutoConstraint being confirmed without releasing the MMB
The transform modifiers are confirmed by releasing any button. Thus, the operation can be falsely confirmed if the button that launched the operation is released after the modifier has been activated. Previously the events that confirmed the modifiers were hardcoded. An option to fix this would be to add custom confirmation keyitens for specific modifiers. But this can be a bit confusing and would make the modal keymap even bigger. So the solution here is to skip the button that launched the operation when confirming the modifier.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 77ce9c10c77..817b980fa24 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1203,7 +1203,24 @@ int transformEvent(TransInfo *t, const wmEvent *event)
handled = true;
}
break;
+ case EVENT_NONE:
+ case INBETWEEN_MOUSEMOVE:
+ case INPUTCHANGE:
+ case WINDEACTIVATE:
+ case TIMER:
+ case TIMERJOBS:
+ case TIMERAUTOSAVE:
+ case TIMERREPORT:
+ case TIMERREGION:
+ case TIMERNOTIFIER:
+ case TIMERF:
+ /* Although rare, prevent these events from affecting the state of the modifiers. */
+ break;
default: {
+ if (event->type == t->launch_event) {
+ /* The user can hold the launch button and release it here. */
+ break;
+ }
/* Disable modifiers. */
int modifiers = t->modifiers;
modifiers &= ~MOD_CONSTRAINT_SELECT;