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/uvedit
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/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c8
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;
}
}