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:
authorCampbell Barton <ideasman42@gmail.com>2021-10-19 04:22:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-19 04:50:07 +0300
commitb74f2c7d74dc18ab9afa105a2cfe547fabb42d57 (patch)
tree71f8f9e3cc325a06990b8638b3947ca2d6cd949e /source/blender/editors/space_image/image_ops.c
parenta3457704fb63a59045b093dc4499b43f6676fabb (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/space_image/image_ops.c')
-rw-r--r--source/blender/editors/space_image/image_ops.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 94d44e047a4..0dbcb1885c2 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -3628,13 +3628,8 @@ static int change_frame_invoke(bContext *C, wmOperator *op, const wmEvent *event
ARegion *region = CTX_wm_region(C);
if (region->regiontype == RGN_TYPE_WINDOW) {
- SpaceImage *sima = CTX_wm_space_image(C);
-
- /* Local coordinate visible rect inside region, to accommodate overlapping ui. */
- const rcti *rect_visible = ED_region_visible_rect(region);
- const int region_bottom = rect_visible->ymin;
-
- if (event->mval[1] > (region_bottom + 16 * UI_DPI_FAC) || !ED_space_image_show_cache(sima)) {
+ const SpaceImage *sima = CTX_wm_space_image(C);
+ if (!ED_space_image_show_cache_and_mval_over(sima, region, event->mval)) {
return OPERATOR_PASS_THROUGH;
}
}