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:
authorCampbell Barton <ideasman42@gmail.com>2020-05-21 05:05:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-21 05:22:32 +0300
commit522e6c0c06197a2fe46810c4f77ddba881f12cbf (patch)
treea0cfa18815710f95642e395cfd5294bda1943178 /source/blender/editors/space_info
parentaf3a55bb1b7d11c3036839d66fcf4280f1dae96b (diff)
Cleanup: add asserts for textview drawing
This would have prevented T74298.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/textview.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index 3c0ef4a6386..5d5c41597b4 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -429,6 +429,11 @@ int textview_draw(TextViewContext *tvc,
tvc->end(tvc);
+ /* Sanity checks (bugs here can be tricky to track down). */
+ BLI_assert(tds.lheight == tvc->lheight);
+ BLI_assert(tds.row_vpadding == tvc->row_vpadding);
+ BLI_assert(tds.do_draw == do_draw);
+
xy[1] += tvc->lheight * 2;
return xy[1] - y_orig;