Fix error in recent gizmo tweak workaround
This commit is contained in:
parent
7ba1489bd7
commit
c14e352d2c
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue