diff options
-rw-r--r-- | source/blender/src/drawview.c | 6 | ||||
-rw-r--r-- | source/blender/src/editmesh_mods.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 952ca35b5d9..67b638b5c04 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -636,7 +636,9 @@ static void drawfloor(void) vert[2]= 0.0; if(vd->gridlines<3) return; - + + if(G.zbuf && G.obedit) glDepthMask(0); // for zbuffer-select + gridlines= vd->gridlines/2; grid= gridlines*vd->grid; @@ -736,6 +738,8 @@ static void drawfloor(void) glEnd(); } + if(G.zbuf && G.obedit) glDepthMask(1); + } static void drawcursor(void) diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index 00924a30f67..1ada47b4246 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -105,7 +105,7 @@ int EM_zbuffer_visible(float *co, short xs, short ys) static float persmat[4][4]; float zval, vec4[4]; - if(G.vd->drawtype<OB_SOLID && (G.vd->flag & V3D_ZBUF_SELECT)==0) return 1; + if(G.vd->drawtype<OB_SOLID || (G.vd->flag & V3D_ZBUF_SELECT)==0) return 1; if(co==NULL) { // init float pmat[4][4], vmat[4][4]; |