Commit: c14e352d2ceb62288349bfc7afa4453d6cf38646 Author: Campbell Barton Date: Thu Dec 19 15:48:33 2019 +1100 Branches: master https://developer.blender.org/rBc14e352d2ceb62288349bfc7afa4453d6cf38646
Fix error in recent gizmo tweak workaround =================================================================== M source/blender/windowmanager/gizmo/WM_gizmo_types.h M source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c =================================================================== diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.h b/source/blender/windowmanager/gizmo/WM_gizmo_types.h index fc876b56de7..c667dd564f7 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_types.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.h @@ -461,12 +461,12 @@ typedef struct wmGizmoGroup { struct ReportList *reports; /** Has the same result as hiding all gizmos individually. */ - struct { - /* Reasons for hiding. */ - union { + union { + /** Reasons for hiding. */ + struct { uint delay_refresh_for_tweak : 1; }; - /* All, when we only want to check. */ + /** All, when we only want to check if any are hidden. */ uint any; } hide; diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c index f176f0e5df4..c3dfdd9a419 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c @@ -407,7 +407,7 @@ static void gizmomap_prepare_drawing(wmGizmoMap *gzmap, for (wmGizmoGroup *gzgroup = gzmap->groups.first; gzgroup; gzgroup = gzgroup->next) { /* check group visibility - drawstep first to avoid unnecessary call of group poll callback */ - if ((gzgroup->hide.any != 0) || !wm_gizmogroup_is_visible_in_drawstep(gzgroup, drawstep) || + if (!wm_gizmogroup_is_visible_in_drawstep(gzgroup, drawstep) || !WM_gizmo_group_type_poll(C, gzgroup->type)) { continue; } @@ -422,6 +422,11 @@ static void gizmomap_prepare_drawing(wmGizmoMap *gzmap, /* Calls `setup`, `setup_keymap` and `refresh` if they're defined. */ WM_gizmogroup_ensure_init(C, gzgroup); + /* Check after ensure which can run refresh and update this value. */ + if (gzgroup->hide.any != 0) { + continue; + } + /* prepare drawing */ if (gzgroup->type->draw_prepare) { gzgroup->type->draw_prepare(C, gzgroup); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs