Fix failing assert when dragging panel close to region edge

Forgot to include this change from Julian Eisel @Severin in the
previous commit.
This commit is contained in:
Hans Goudey
2020-06-05 10:05:47 -04:00
parent 859505a3da
commit e9659d0e6e

View File

@@ -436,8 +436,8 @@ static float edge_pan_speed(v2dViewPanData *vpd,
ARegion *region = vpd->region;
/* Find the distance from the start of the drag zone. */
int min = x_dir ? region->winrct.xmin : region->winrct.ymin + EDGE_PAN_REGION_PAD;
int max = x_dir ? region->winrct.xmax : region->winrct.ymax - EDGE_PAN_REGION_PAD;
int min = (x_dir ? region->winrct.xmin : region->winrct.ymin) + EDGE_PAN_REGION_PAD;
int max = (x_dir ? region->winrct.xmax : region->winrct.ymax) - EDGE_PAN_REGION_PAD;
int distance = 0.0;
if (event_loc > max) {
distance = event_loc - max;