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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-28 12:52:02 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-28 12:52:02 +0400
commitea187e54a8cd4456dbbfb474ba652b2aab69756f (patch)
tree99d8749a615dc43e708a4762b578fe5ef9189a47 /source/blender/editors/interface/view2d.c
parent92ee7ca94659783230ae1d10ab63ab7684718e8f (diff)
Fix #19482: setting cursor position in uv editor was not correct
zoomed in, needed to make view2d offset for pixel rounding dependent on zoom level.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index be58a78ca85..2da491e488d 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -973,8 +973,8 @@ void UI_view2d_view_ortho(const bContext *C, View2D *v2d)
/* XXX brecht: instead of zero at least use a tiny offset, otherwise
* pixel rounding is effectively random due to float inaccuracy */
- xofs= 0.001f;
- yofs= 0.001f;
+ xofs= 0.001f*(v2d->cur.xmax - v2d->cur.xmin)/(v2d->mask.xmax - v2d->mask.xmin);
+ yofs= 0.001f*(v2d->cur.ymax - v2d->cur.ymin)/(v2d->mask.ymax - v2d->mask.ymin);
/* apply mask-based adjustments to cur rect (due to scrollers), to eliminate scaling artifacts */
view2d_map_cur_using_mask(v2d, &curmasked);