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:
authorJeroen Bakker <jbakker>2020-01-14 18:29:45 +0300
committerJeroen Bakker <jeroen@blender.org>2020-01-14 18:30:32 +0300
commit29ab2386c025db7470c21f03f6ab31997eece6b3 (patch)
treeb88ff44432aecb2e31ce328d259f2c169c676e24 /source/blender/editors/screen
parent51add8e6d0a18569c5c4c077b1aba6c5f13a970a (diff)
Fix T72200: Split Quad View Region Crash
When splitting a Quad View by dragging a corner an quad area can become negative size because of a one pixel offset to calculate the start of the area. This patch solves this to make sure that there are no negative areas. By adapting the `ARegion.winrct`. Reviewed By: Severin Differential Revision: https://developer.blender.org/D6579
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 98bee156090..29626fb6a8f 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1437,6 +1437,11 @@ static void region_rect_recursive(
BLI_rcti_init(remainder, 0, 0, 0, 0);
}
+ /* Fix any negative dimensions. This can happen when a quad split 3d view gets to small. (see
+ * T72200). BLI_rcti_init() sanitizes, making sure min values are <= max values. */
+ BLI_rcti_init(
+ &ar->winrct, ar->winrct.xmin, ar->winrct.xmax, ar->winrct.ymin, ar->winrct.ymax);
+
quad++;
}
}
@@ -2897,7 +2902,7 @@ void ED_region_info_draw(ARegion *ar,
float fill_color[4],
const bool full_redraw)
{
- ED_region_info_draw_multiline(ar, (const char *[2]){text, NULL}, fill_color, full_redraw);
+ ED_region_info_draw_multiline(ar, (const char * [2]){text, NULL}, fill_color, full_redraw);
}
#define MAX_METADATA_STR 1024