From 5f66dfa37177d53f49800e1353998845c2526b51 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Tue, 1 Jun 2021 13:09:39 +0100 Subject: [PATCH] Fix TextEdit selection drawing behing minimap --- scene/gui/text_edit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 4b199d1441b..65d4433f4e3 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1187,7 +1187,8 @@ void TextEdit::_notification(int p_what) { if (rect.position.x < xmargin_beg) { rect.size.x -= (xmargin_beg - rect.position.x); rect.position.x = xmargin_beg; - } else if (rect.position.x + rect.size.x > xmargin_end) { + } + if (rect.position.x + rect.size.x > xmargin_end) { rect.size.x = xmargin_end - rect.position.x; } draw_rect(rect, cache.selection_color, true);