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:
authorCampbell Barton <ideasman42@gmail.com>2021-10-27 11:01:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-27 16:24:52 +0300
commitaea7e555221e071e65fe76eb9571198622bbc547 (patch)
treec63b01d327693cfa82a1d0b6ba3b7f675593df45 /source/blender/editors/armature/armature_select.c
parent2a709c82c369a8b87592156bf1afc0222d44a778 (diff)
WM: de-duplicate cursor motion checks for selection picking
Replace local static mouse coordinate storage with a single function. also resolve inconsistencies. - Edit-mesh selection used equality check (ignoring `U.move_threshold`). - Motion to clear tooltips checked the value without scaling by the DPI. Also prevent the unlikely case of the previous motion check matching a different area by resetting the value when the active region changes.
Diffstat (limited to 'source/blender/editors/armature/armature_select.c')
-rw-r--r--source/blender/editors/armature/armature_select.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index bd799c00373..937385f9ffa 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -673,11 +673,7 @@ static EditBone *get_nearest_editbonepoint(
}
if (use_cycle) {
- static int last_mval[2] = {-100, -100};
- if ((len_manhattan_v2v2_int(vc->mval, last_mval) <= WM_EVENT_CURSOR_MOTION_THRESHOLD) == 0) {
- use_cycle = false;
- }
- copy_v2_v2_int(last_mval, vc->mval);
+ use_cycle = !WM_cursor_test_motion_and_update(vc->mval);
}
const bool do_nearest = !(XRAY_ACTIVE(vc->v3d) || use_cycle);