From b74f2c7d74dc18ab9afa105a2cfe547fabb42d57 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Oct 2021 12:22:06 +1100 Subject: Fix image cache margin calculation This margin was inconsistently calculated: only taking the visible region and interface scale into account in some cases. --- source/blender/editors/util/ed_util_imbuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/editors/util') diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c index ca21f88b230..159826568d1 100644 --- a/source/blender/editors/util/ed_util_imbuf.c +++ b/source/blender/editors/util/ed_util_imbuf.c @@ -491,9 +491,8 @@ int ED_imbuf_sample_invoke(bContext *C, wmOperator *op, const wmEvent *event) if (sa && sa->spacetype == SPACE_IMAGE) { SpaceImage *sima = CTX_wm_space_image(C); - if (region->regiontype == RGN_TYPE_WINDOW) { - if (event->mval[1] <= 16 && ED_space_image_show_cache(sima)) { + if (ED_space_image_show_cache_and_mval_over(sima, region, event->mval)) { return OPERATOR_PASS_THROUGH; } } -- cgit v1.2.3