Fix #36499: proportional edit circle was drawing behind objects in some cases,

now it always draws in front to ensure the circle is visible.
This commit is contained in:
Brecht Van Lommel
2013-08-21 12:20:31 +00:00
parent 649743dfd6
commit 76a4d91dc4

View File

@@ -727,6 +727,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
RegionView3D *rv3d = CTX_wm_region_view3d(C);
float tmat[4][4], imat[4][4];
float center[3];
int depth_test_enabled;
UI_ThemeColor(TH_GRID);
@@ -759,10 +760,17 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
glScalef(1.0f / aspx, 1.0f / aspy, 1.0);
}
depth_test_enabled = glIsEnabled(GL_DEPTH_TEST);
if (depth_test_enabled)
glDisable(GL_DEPTH_TEST);
set_inverted_drawing(1);
drawcircball(GL_LINE_LOOP, center, t->prop_size, imat);
set_inverted_drawing(0);
if (depth_test_enabled)
glEnable(GL_DEPTH_TEST);
glPopMatrix();
}
}