Fix #110721: "show_gizmo" does not switch off all gizmos

Not all gizmos were hidden when "show_gizmo" was disabled (most notably
python defined gizmos).
This was working in the 3DView and the Sequencer, but not respected in
the Clip Editor and Image/UV Editors.

Now check the flag prior to `WM_gizmomap_draw`.

Probably good for LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/110932
This commit is contained in:
Philipp Oeser
2023-08-09 08:31:15 +02:00
committed by Philipp Oeser
parent da0fef65c0
commit 36cd1755d2
2 changed files with 6 additions and 4 deletions

View File

@@ -783,8 +783,9 @@ static void clip_main_region_draw(const bContext *C, ARegion *region)
/* draw Grease Pencil - screen space only */
clip_draw_grease_pencil((bContext *)C, false);
}
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
if ((sc->gizmo_flag & SCLIP_GIZMO_HIDE) == 0) {
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
}
}
static void clip_main_region_listener(const wmRegionListenerParams *params)

View File

@@ -720,8 +720,9 @@ static void image_main_region_draw(const bContext *C, ARegion *region)
nullptr,
C);
}
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
if ((sima->gizmo_flag & SI_GIZMO_HIDE) == 0) {
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
}
draw_image_cache(C, region);
}