summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-01 14:42:15 +0200
committerGitHub <noreply@github.com>2021-06-01 14:42:15 +0200
commita74498309471e950668596eb50b0dd0d2a996dde (patch)
tree02c3256341c30651c2a5a5f8c87b65defc996036
parentbbaac168712132be59a13a2924201d7181874f73 (diff)
parent5f66dfa37177d53f49800e1353998845c2526b51 (diff)
Merge pull request #49239 from Paulb23/text_edit_selection_behind_minimap
Fix TextEdit selection drawing behing minimap
-rw-r--r--scene/gui/text_edit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 4b199d1441..65d4433f4e 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);