Correct error in 6aebb5a4d5f5c
authorCampbell Barton <ideasman42@gmail.com>
Sat, 16 Mar 2019 10:49:33 +0000 (21:49 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 16 Mar 2019 10:49:33 +0000 (21:49 +1100)
source/blender/draw/modes/edit_text_mode.c

index f52bfac..caebc94 100644 (file)
@@ -151,9 +151,11 @@ static void EDIT_TEXT_engine_init(void *vedata)
  * Assume that all Passes are NULL */
 static void EDIT_TEXT_cache_init(void *vedata)
 {
+       const DRWContextState *draw_ctx = DRW_context_state_get();
        EDIT_TEXT_PassList *psl = ((EDIT_TEXT_Data *)vedata)->psl;
        EDIT_TEXT_StorageList *stl = ((EDIT_TEXT_Data *)vedata)->stl;
 
+
        if (!stl->g_data) {
                /* Alloc transient pointers */
                stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__);
@@ -179,8 +181,8 @@ static void EDIT_TEXT_cache_init(void *vedata)
                psl->text_box_pass = DRW_pass_create(
                        "Font Text Boxes",
                        DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH);
-               stl->g_data->box_shgrp = shgroup_dynlines_dashed_uniform_color(psl->text_box_pass, G_draw.block.colorWire);
-               stl->g_data->box_active_shgrp = shgroup_dynlines_dashed_uniform_color(psl->text_box_pass, G_draw.block.colorActive);
+               stl->g_data->box_shgrp = shgroup_dynlines_dashed_uniform_color(psl->text_box_pass, G_draw.block.colorWire, draw_ctx->sh_cfg);
+               stl->g_data->box_active_shgrp = shgroup_dynlines_dashed_uniform_color(psl->text_box_pass, G_draw.block.colorActive, draw_ctx->sh_cfg);
        }
 }