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 <campbell@blender.org>2022-03-29 08:11:44 +0300
committerCampbell Barton <campbell@blender.org>2022-03-29 08:56:55 +0300
commitd4bdf2192964f786520c774d1a2ee44617302bc1 (patch)
treeef0a791576bf79c962b4098cb58ffee3454c3440 /source/blender/windowmanager/gizmo
parent540bfbbb27966b4b8affeaa273a70beac9373b23 (diff)
Fix T96701: RMB select fails to show gizmo on mouse button release
Regression in [0] which removed a special check when tweak events ended. Add a similar check for drag events that runs drag is disabled in the main event handling loop. [0]: 4986f718482b061082936f1f6aa13929741093a2
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
index 00615d9d662..d7b54129caa 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
@@ -1130,7 +1130,12 @@ void WM_gizmo_group_refresh(const bContext *C, wmGizmoGroup *gzgroup)
const wmGizmoGroupType *gzgt = gzgroup->type;
if (gzgt->flag & WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK) {
wmGizmoMap *gzmap = gzgroup->parent_gzmap;
- wmGizmo *gz = wm_gizmomap_highlight_get(gzmap);
+ wmGizmo *gz = NULL;
+ /* Without the check for refresh, any highlighted gizmo will prevent hiding
+ * when selecting with RMB when the cursor happens to be over a gizmo. */
+ if ((gzgroup->init_flag & WM_GIZMOGROUP_INIT_REFRESH) == 0) {
+ gz = wm_gizmomap_highlight_get(gzmap);
+ }
if (!gz || gz->parent_gzgroup != gzgroup) {
wmWindow *win = CTX_wm_window(C);
ARegion *region = CTX_wm_region(C);