Fix T67637: Selected edges hard to see with wireframe
authorCampbell Barton <ideasman42@gmail.com>
Mon, 9 Sep 2019 19:58:02 +0000 (05:58 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 9 Sep 2019 19:59:50 +0000 (05:59 +1000)
Always show selected edges in wire/xray modes.

release/scripts/startup/bl_ui/space_view3d.py
source/blender/draw/modes/edit_mesh_mode.c

index 5351fe07ed3fb7a7ebde32a96167c5326068b230..6771ddef9e9673c359c0a322419351c5ae1c4050 100644 (file)
@@ -2099,7 +2099,7 @@ class VIEW3D_MT_object_relations(Menu):
         layout = self.layout
 
         layout.operator("object.proxy_make", text="Make Proxy...")
-        
+
         if bpy.app.use_override_library:
             layout.operator("object.make_override_library", text="Make Library Override...")
 
@@ -5613,6 +5613,7 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
         layout = self.layout
 
         view = context.space_data
+        shading = view.shading
         overlay = view.overlay
         display_all = overlay.show_overlays
 
@@ -5622,6 +5623,7 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
         split = col.split()
 
         sub = split.column()
+        sub.active = not ((shading.type == 'WIREFRAME') or shading.show_xray)
         sub.prop(overlay, "show_edges", text="Edges")
         sub = split.column()
         sub.prop(overlay, "show_faces", text="Faces")
index f8247d7929e52507721298e20a6a4c0886b1610f..b76c17b981b15c47d29548e1002f7fbe9a9d930f 100644 (file)
@@ -459,7 +459,12 @@ static void EDIT_MESH_cache_init(void *vedata)
       }
       if ((v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_EDGES) == 0) {
         if ((tsettings->selectmode & SCE_SELECT_EDGE) == 0) {
-          g_data->do_edges = false;
+          if ((v3d->shading.type < OB_SOLID) || (v3d->shading.flag & V3D_SHADING_XRAY)) {
+            /* Special case, when drawing wire, draw edges, see: T67637. */
+          }
+          else {
+            g_data->do_edges = false;
+          }
         }
       }
       if ((v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_CREASES) == 0) {