Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_ops.c
| Show First 20 Lines • Show All 3,880 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static int change_frame_invoke(bContext *C, wmOperator *op, const wmEvent *event) | static int change_frame_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| { | { | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| if (ar->regiontype == RGN_TYPE_WINDOW) { | if (ar->regiontype == RGN_TYPE_WINDOW) { | ||||
| SpaceImage *sima = CTX_wm_space_image(C); | SpaceImage *sima = CTX_wm_space_image(C); | ||||
| if (event->mval[1] > 16 || !ED_space_image_show_cache(sima)) { | |||||
| /* Local coordinate visible rect inside region, to accommodate overlapping ui. */ | |||||
| const rcti *rect_visible = ED_region_visible_rect(ar); | |||||
| const int region_bottom = rect_visible->ymin; | |||||
| if (event->mval[1] > (region_bottom + 16 * UI_DPI_FAC) || !ED_space_image_show_cache(sima)) { | |||||
| return OPERATOR_PASS_THROUGH; | return OPERATOR_PASS_THROUGH; | ||||
| } | } | ||||
| } | } | ||||
| RNA_int_set(op->ptr, "frame", frame_from_event(C, event)); | RNA_int_set(op->ptr, "frame", frame_from_event(C, event)); | ||||
| change_frame_apply(C, op); | change_frame_apply(C, op); | ||||
| ▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines | |||||