Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-10-21 22:37:41 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-10-21 22:37:41 +0300
commit0c668852765ddac0ebe2d34f347095baac7eacc4 (patch)
tree4d632ce99c9d4d75dbeff0bd3ed1a23fcad23f40 /source/blender/editors/space_view3d/view3d_cursor_snap.c
parentbe171b295fc7defa451ef8eba8bc9dbf260c511a (diff)
View3D Snap Cursor: Fix drawing state incorrectly reset
The viewport was being changed, so it needs to be reset.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_cursor_snap.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_cursor_snap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c
index ff5c5c6a946..1cb650910ce 100644
--- a/source/blender/editors/space_view3d/view3d_cursor_snap.c
+++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c
@@ -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(&region->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));
}
/** \} */