diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-06-24 10:05:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-06-24 10:06:44 +0300 |
commit | 829561c03cce4d2bfab18bba4e7e7b5351addcd3 (patch) | |
tree | adcf4b2fcc065a63c06f5a0ffe4c819a2a3746a3 | |
parent | 9bc49c051e755b17f319ed3b06762d8d645a8455 (diff) |
Fix T66071: Navigation tooltip shows outside of 3D view
Clear gizmo highlight when the cursor leaves the region.
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 9 | ||||
-rw-r--r-- | source/blender/windowmanager/gizmo/WM_gizmo_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo.c | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 3a90532aa56..e59477fbe6e 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -681,6 +681,15 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) area_iter->type->deactivate(area_iter); } + if (ar == old_ar && ar != scr->active_region) { + wmGizmoMap *gzmap = old_ar->gizmo_map; + if (gzmap) { + if (WM_gizmo_highlight_set(gzmap, NULL)) { + ED_region_tag_redraw_no_rebuild(old_ar); + } + } + } + if (ar == old_ar || ar == scr->active_region) { do_draw = true; } diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h index 9b0936b47d1..5bf18a01af5 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h @@ -67,7 +67,7 @@ void WM_gizmo_unlink(ListBase *gizmolist, bool WM_gizmo_select_unlink(struct wmGizmoMap *gzmap, struct wmGizmo *gz); bool WM_gizmo_select_set(struct wmGizmoMap *gzmap, struct wmGizmo *gz, bool select); -void WM_gizmo_highlight_set(struct wmGizmoMap *gzmap, struct wmGizmo *gz); +bool WM_gizmo_highlight_set(struct wmGizmoMap *gzmap, struct wmGizmo *gz); void WM_gizmo_modal_set_from_setup(struct wmGizmoMap *gzmap, struct bContext *C, diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c index b05865aa7bb..8eefea84ff8 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c @@ -443,9 +443,9 @@ bool WM_gizmo_select_set(wmGizmoMap *gzmap, wmGizmo *gz, bool select) return wm_gizmo_select_set_ex(gzmap, gz, select, true, true); } -void WM_gizmo_highlight_set(wmGizmoMap *gzmap, wmGizmo *gz) +bool WM_gizmo_highlight_set(wmGizmoMap *gzmap, wmGizmo *gz) { - wm_gizmomap_highlight_set(gzmap, NULL, gz, gz ? gz->highlight_part : 0); + return wm_gizmomap_highlight_set(gzmap, NULL, gz, gz ? gz->highlight_part : 0); } bool wm_gizmo_select_and_highlight(bContext *C, wmGizmoMap *gzmap, wmGizmo *gz) |