View3D Snap Cursor: Fix drawing state incorrectly reset
The viewport was being changed, so it needs to be reset.
This commit is contained in:
parent
be171b295f
commit
0c66885276
|
@ -799,8 +799,6 @@ static void v3d_cursor_snap_draw_fn(bContext *C, int x, int y, void *UNUSED(cust
|
|||
/* Setup viewport & matrix. */
|
||||
RegionView3D *rv3d = region->regiondata;
|
||||
wmViewport(®ion->winrct);
|
||||
GPU_matrix_push_projection();
|
||||
GPU_matrix_push();
|
||||
GPU_matrix_projection_set(rv3d->winmat);
|
||||
GPU_matrix_set(rv3d->viewmat);
|
||||
|
||||
|
@ -834,8 +832,7 @@ static void v3d_cursor_snap_draw_fn(bContext *C, int x, int y, void *UNUSED(cust
|
|||
GPU_blend(GPU_BLEND_NONE);
|
||||
|
||||
/* Restore matrix. */
|
||||
GPU_matrix_pop();
|
||||
GPU_matrix_pop_projection();
|
||||
wmWindowViewport(CTX_wm_window(C));
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue