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/util | |
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/util')
-rw-r--r-- | source/blender/editors/util/ed_util_imbuf.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; } } |