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:
authorHans Goudey <h.goudey@me.com>2020-06-05 17:05:47 +0300
committerHans Goudey <h.goudey@me.com>2020-06-05 17:05:47 +0300
commite9659d0e6e22d55ba85ed24412fb866293b20c5a (patch)
tree5b3e538466b84069b679705e33f4296d0c41c181
parent859505a3dae8b23a44c7216b9a3aa753594ae1b0 (diff)
Fix failing assert when dragging panel close to region edge
Forgot to include this change from Julian Eisel @Severin in the previous commit.
-rw-r--r--source/blender/editors/interface/view2d_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index ff35b25e488..98bbd7af943 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -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;