diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-19 04:22:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-19 04:50:07 +0300 |
commit | b74f2c7d74dc18ab9afa105a2cfe547fabb42d57 (patch) | |
tree | 71f8f9e3cc325a06990b8638b3947ca2d6cd949e /source/blender/editors/uvedit | |
parent | a3457704fb63a59045b093dc4499b43f6676fabb (diff) |
Fix image cache margin calculation
This margin was inconsistently calculated: only taking the
visible region and interface scale into account in some cases.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 0757e177235..acdffd5ff98 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1765,11 +1765,9 @@ static int uv_set_2d_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *e float location[2]; if (region->regiontype == RGN_TYPE_WINDOW) { - if (event->mval[1] <= 16) { - SpaceImage *sima = CTX_wm_space_image(C); - if (sima && ED_space_image_show_cache(sima)) { - return OPERATOR_PASS_THROUGH; - } + SpaceImage *sima = CTX_wm_space_image(C); + if (sima && ED_space_image_show_cache_and_mval_over(sima, region, event->mval)) { + return OPERATOR_PASS_THROUGH; } } |