Fix T66071: Navigation tooltip shows outside of 3D view
Clear gizmo highlight when the cursor leaves the region.
This commit is contained in:
parent
9bc49c051e
commit
829561c03c
Notes:
blender-bot
2023-02-14 08:07:50 +01:00
Referenced by issue #66071, 3dview axes navigation gizmo gets stuck on and tooltip shows up in outliner
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue