Fix T59273: Text object disappears when Fill Mode is set to None
[blender.git] / source / blender / draw / modes / edit_text_mode.c
index cb87a015717893bdbff2122951ef55e3ab3a7068..40cbd876473922e563e98f812f044f44489985ca 100644 (file)
@@ -337,7 +337,8 @@ static void EDIT_TEXT_cache_populate(void *vedata, Object *ob)
                        /* Get geometry cache */
                        struct GPUBatch *geom;
 
-                       if (cu->flag & CU_FAST) {
+                       bool has_surface = (cu->flag & (CU_FRONT | CU_BACK)) || cu->ext1 != 0.0f || cu->ext2 != 0.0f;
+                       if ((cu->flag & CU_FAST) || !has_surface) {
                                geom = DRW_cache_text_edge_wire_get(ob);
                                if (geom) {
                                        DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat);