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>2019-06-11 04:43:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-11 05:04:03 +0300
commit6868202899824a46ee28eb02df74efd76f6e3503 (patch)
tree406691340feb9642473a0fb8485349e6d225fa9e /source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
parenta0608340ae14363fb865b4f7d449c77176f953ac (diff)
Fix T62875: Tooltips behave erratically with view gizmos
Improvements to behavior for gizmo tool-tips. - 2D gizmos no longer cancel tool-tips on cursor motion (matching the behavior of UI widgets). - 3D gizmos still close on motion since 3D gizmos may have a large on-screen area which would cause them to stay visible even after the cursor has been moved a large distance. The motion threshold is used so they don't close on unintended cursor motion. - Changing highlighted gizmo now cancels the tool-tip & resets the timer.
Diffstat (limited to 'source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index 73fae5fd46a..6915ea91c8e 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -1144,10 +1144,15 @@ struct ARegion *WM_gizmomap_tooltip_init(struct bContext *C,
bool *r_exit_on_event)
{
wmGizmoMap *gzmap = ar->gizmo_map;
- *r_exit_on_event = true;
+ *r_exit_on_event = false;
if (gzmap) {
wmGizmo *gz = gzmap->gzmap_context.highlight;
if (gz) {
+ wmGizmoGroup *gzgroup = gz->parent_gzgroup;
+ if ((gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D) != 0) {
+ /* On screen area of 3D gizmos may be large, exit on cursor motion. */
+ *r_exit_on_event = true;
+ }
return UI_tooltip_create_from_gizmo(C, gz);
}
}