diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-25 15:10:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-25 15:10:27 +0300 |
commit | de669c3b602fbc81cd015b06c18f2de6414ba749 (patch) | |
tree | b12bda9a849098e987e563edea321f1a823db40a /source/blender/editors/space_view3d | |
parent | 16377abda8adb6444e888d1144d9225fa6415e65 (diff) |
WM: ensure 3D view theme is used in select-loop
Yet another case where theme could be used uninitialized.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 56508ea989a..3d35d828e93 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2523,9 +2523,14 @@ void ED_view3d_draw_select_loop( ViewContext *vc, Scene *scene, View3D *v3d, ARegion *ar, bool use_obedit_skip, bool use_nearest) { + struct bThemeState theme_state; short code = 1; const short dflag = DRAW_PICKING | DRAW_CONSTCOLOR; + /* Tools may request depth outside of regular drawing code. */ + UI_Theme_Store(&theme_state); + UI_SetTheme(SPACE_VIEW3D, RGN_TYPE_WINDOW); + if (vc->obedit && vc->obedit->type == OB_MBALL) { draw_object(scene, ar, v3d, BASACT, dflag); } @@ -2569,6 +2574,8 @@ void ED_view3d_draw_select_loop( } } } + + UI_Theme_Restore(&theme_state); } typedef struct View3DShadow { |