diff options
author | Germano Cavalcante <mano-wii> | 2020-12-09 15:10:56 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-12-09 15:34:44 +0300 |
commit | b9eb5921332922757acacd2c9251d8c89c9a239a (patch) | |
tree | 938326f2260f70b7a696f0e98a403286f5e8b90c /source/blender/editors/space_view3d/view3d_placement.c | |
parent | 5a8012b6a69c42b7ad7bf7e6d55c2a4abd344ea2 (diff) |
Fix T83460: Regression in snap for measure tool
Now the gizmo is drawn only when the eventstate located in
`wm->winactive->eventstate` has not changed.
So it doesn't matter if it's "selected" or not.
This commit also removes the use of the private header "wm.h"
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D9539
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_placement.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_placement.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c index 7e8ed276766..bd71a768c0f 100644 --- a/source/blender/editors/space_view3d/view3d_placement.c +++ b/source/blender/editors/space_view3d/view3d_placement.c @@ -1357,7 +1357,6 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve const float mval_fl[2] = {UNPACK2(event->mval)}; /* Calculate the snap location on mouse-move or when toggling snap. */ - bool is_snap_found_prev = ipd->is_snap_found; ipd->is_snap_found = false; if (ipd->use_snap) { if (ipd->snap_gizmo != NULL) { @@ -1366,7 +1365,7 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve CTX_data_ensure_evaluated_depsgraph(C), ipd->region, ipd->v3d, - NULL, + G_MAIN->wm.first, mval_fl, ipd->snap_co, NULL)) { @@ -1376,12 +1375,6 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve } } - /* Workaround because test_select doesn't run at the same time as the modal operator. */ - if (is_snap_found_prev != ipd->is_snap_found) { - wmGizmoMap *gzmap = ipd->region->gizmo_map; - WM_gizmo_highlight_set(gzmap, ipd->is_snap_found ? ipd->snap_gizmo : NULL); - } - if (ipd->step_index == STEP_BASE) { if (ipd->is_snap_found) { closest_to_plane_normalized_v3( |