BTextView: ensure text rect width and height is > 0
Helps wth #16476 #16568 Change-Id: Idc8d399cf69776d26e492f568c9ef83bcd7a6686 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3413 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
49e2b1f420
commit
1897036191
@ -509,6 +509,13 @@ BTextView::AttachedToWindow()
|
|||||||
fDragOffset = -1;
|
fDragOffset = -1;
|
||||||
fActive = false;
|
fActive = false;
|
||||||
|
|
||||||
|
// text rect right must be greater than left
|
||||||
|
if (fTextRect.right <= fTextRect.left)
|
||||||
|
fTextRect.right = fTextRect.left + 1;
|
||||||
|
// text rect bottom must be greater than top
|
||||||
|
if (fTextRect.bottom <= fTextRect.top)
|
||||||
|
fTextRect.bottom = fTextRect.top + 1;
|
||||||
|
|
||||||
_AutoResize(true);
|
_AutoResize(true);
|
||||||
|
|
||||||
_UpdateScrollbars();
|
_UpdateScrollbars();
|
||||||
|
Loading…
Reference in New Issue
Block a user