Cleanup: add asserts for textview drawing

This would have prevented T74298.
This commit is contained in:
Campbell Barton 2020-05-21 12:05:33 +10:00
parent af3a55bb1b
commit 522e6c0c06
1 changed files with 5 additions and 0 deletions

View File

@ -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;