Browse Source

Fix TextEdit selection drawing behing minimap

Paulb23 4 years ago
parent
commit
5f66dfa371
1 changed files with 2 additions and 1 deletions
  1. 2 1
      scene/gui/text_edit.cpp

+ 2 - 1
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);