diff options
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index fb87c54c1db..22a43ea3794 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -500,7 +500,7 @@ void draw_image_main_helpers(const bContext *C, ARegion *region) } } -bool ED_space_image_show_cache(SpaceImage *sima) +bool ED_space_image_show_cache(const SpaceImage *sima) { Image *image = ED_space_image(sima); Mask *mask = NULL; @@ -516,6 +516,17 @@ bool ED_space_image_show_cache(SpaceImage *sima) return true; } +bool ED_space_image_show_cache_and_mval_over(const SpaceImage *sima, + ARegion *region, + const int mval[2]) +{ + const rcti *rect_visible = ED_region_visible_rect(region); + if (mval[1] > rect_visible->ymin + (16 * UI_DPI_FAC)) { + return false; + } + return ED_space_image_show_cache(sima); +} + void draw_image_cache(const bContext *C, ARegion *region) { SpaceImage *sima = CTX_wm_space_image(C); |