3D View: respect text option for edit-mode info
This commit is contained in:
parent
a6395cebb7
commit
5736157b5e
|
@ -1230,6 +1230,7 @@ void DRW_draw_view(const bContext *C)
|
|||
|
||||
/* Reset before using it. */
|
||||
drw_state_prepare_clean_for_draw(&DST);
|
||||
DST.options.draw_text = (v3d->overlay.flag & V3D_OVERLAY_HIDE_TEXT) != 0;
|
||||
DRW_draw_render_loop_ex(depsgraph, engine_type, ar, v3d, viewport, C);
|
||||
}
|
||||
|
||||
|
@ -1969,7 +1970,8 @@ bool DRW_state_show_text(void)
|
|||
{
|
||||
return (DST.options.is_select) == 0 &&
|
||||
(DST.options.is_depth) == 0 &&
|
||||
(DST.options.is_scene_render) == 0;
|
||||
(DST.options.is_scene_render) == 0 &&
|
||||
(DST.options.draw_text) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -324,6 +324,7 @@ typedef struct DRWManager {
|
|||
uint is_image_render : 1;
|
||||
uint is_scene_render : 1;
|
||||
uint draw_background : 1;
|
||||
uint draw_text : 1;
|
||||
} options;
|
||||
|
||||
/* Current rendering context */
|
||||
|
|
|
@ -515,8 +515,10 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
|
|||
ME_DRAWEXTRA_EDGEANG |
|
||||
ME_DRAWEXTRA_INDICES))
|
||||
{
|
||||
DRW_edit_mesh_mode_text_measure_stats(
|
||||
draw_ctx->ar, v3d, ob, &scene->unit);
|
||||
if (DRW_state_show_text()) {
|
||||
DRW_edit_mesh_mode_text_measure_stats(
|
||||
draw_ctx->ar, v3d, ob, &scene->unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue