diff --git a/source/blender/editors/screen/area_query.cc b/source/blender/editors/screen/area_query.cc index 00f71d08449..8038471c177 100644 --- a/source/blender/editors/screen/area_query.cc +++ b/source/blender/editors/screen/area_query.cc @@ -24,7 +24,7 @@ bool ED_region_overlap_isect_x(const ARegion *region, const int event_x) if (region->v2d.mask.xmin == region->v2d.mask.xmax) { return false; } - return BLI_rctf_isect_x(®ion->v2d.tot, + return BLI_rctf_isect_x(®ion->v2d.cur, UI_view2d_region_to_view_x(®ion->v2d, event_x - region->winrct.xmin)); } @@ -35,7 +35,7 @@ bool ED_region_overlap_isect_y(const ARegion *region, const int event_y) if (region->v2d.mask.ymin == region->v2d.mask.ymax) { return false; } - return BLI_rctf_isect_y(®ion->v2d.tot, + return BLI_rctf_isect_y(®ion->v2d.cur, UI_view2d_region_to_view_y(®ion->v2d, event_y - region->winrct.ymin)); } @@ -98,8 +98,8 @@ bool ED_region_overlap_isect_x_with_margin(const ARegion *region, return false; } int region_x = event_x - region->winrct.xmin; - return ((region->v2d.tot.xmin <= UI_view2d_region_to_view_x(®ion->v2d, region_x + margin)) && - (region->v2d.tot.xmax >= UI_view2d_region_to_view_x(®ion->v2d, region_x - margin))); + return ((region->v2d.cur.xmin <= UI_view2d_region_to_view_x(®ion->v2d, region_x + margin)) && + (region->v2d.cur.xmax >= UI_view2d_region_to_view_x(®ion->v2d, region_x - margin))); } bool ED_region_overlap_isect_y_with_margin(const ARegion *region, @@ -112,8 +112,8 @@ bool ED_region_overlap_isect_y_with_margin(const ARegion *region, return false; } int region_y = event_y - region->winrct.ymin; - return ((region->v2d.tot.ymin <= UI_view2d_region_to_view_y(®ion->v2d, region_y + margin)) && - (region->v2d.tot.ymax >= UI_view2d_region_to_view_y(®ion->v2d, region_y - margin))); + return ((region->v2d.cur.ymin <= UI_view2d_region_to_view_y(®ion->v2d, region_y + margin)) && + (region->v2d.cur.ymax >= UI_view2d_region_to_view_y(®ion->v2d, region_y - margin))); } bool ED_region_overlap_isect_xy_with_margin(const ARegion *region,