diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-30 09:52:05 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-30 09:52:05 +0400 |
commit | b09ee4923d4066ec032fb3105355c79618352b46 (patch) | |
tree | 1f54c5a497ef48e08790de6b2da394cb02f93e01 /source/blender/editors/uvedit/uvedit_draw.c | |
parent | 5089663962a14a3cc21f342db66a0c157bfd7dfc (diff) |
Fix [#21711] Position of 2d cursor is not displayed correctly and cannot be set
in uv/image editor properties panel
Note: Moved UV editor 2d cursor to SpaceImage rather than View2d, so it's
more accessible to RNA.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_draw.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_draw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index ce59c8e37b4..e3bf1e83247 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -56,7 +56,6 @@ static void drawcursor_sima(SpaceImage *sima, ARegion *ar) { - View2D *v2d= &ar->v2d; float zoomx, zoomy, w, h; int width, height; @@ -67,7 +66,7 @@ static void drawcursor_sima(SpaceImage *sima, ARegion *ar) h= zoomy*height/256.0f; cpack(0xFFFFFF); - glTranslatef(v2d->cursor[0], v2d->cursor[1], 0.0f); + glTranslatef(sima->cursor[0], sima->cursor[1], 0.0f); fdrawline(-0.05/w, 0, 0, 0.05/h); fdrawline(0, 0.05/h, 0.05/w, 0); fdrawline(0.05/w, 0, 0, -0.05/h); @@ -95,7 +94,7 @@ static void drawcursor_sima(SpaceImage *sima, ARegion *ar) fdrawline(0, -0.020/h, 0, -0.1/h); fdrawline(0, 0.1/h, 0, 0.020/h); - glTranslatef(-v2d->cursor[0], -v2d->cursor[1], 0.0f); + glTranslatef(-sima->cursor[0], -sima->cursor[1], 0.0f); setlinestyle(0); } |