diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-01 10:22:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-01 10:22:08 +0300 |
commit | 5736157b5eeeb514c4c226ec64cf1bb28906b32b (patch) | |
tree | e6278ae44b54e084296d16ad87e9fa40f5852eb7 /source | |
parent | a6395cebb72b581afcafe916cefdd463a800a956 (diff) |
3D View: respect text option for edit-mode info
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 4 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.h | 1 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 2aa24ade1b2..e29dc69111f 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -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; } /** diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index ff4f6d25810..b24a8458de2 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -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 */ diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 58ebef040da..b50fb554a51 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -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); + } } } } |