Переглянути джерело

fix selection in LineEdit

Aryombre 5 місяців тому
батько
коміт
209189b969
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      scene/gui/line_edit.cpp

+ 2 - 1
scene/gui/line_edit.cpp

@@ -1202,7 +1202,8 @@ void LineEdit::_notification(int p_what) {
 					if (rect.position.x < x_ofs) {
 						rect.size.x -= (x_ofs - rect.position.x);
 						rect.position.x = x_ofs;
-					} else if (rect.position.x + rect.size.x > ofs_max) {
+					}
+					if (rect.position.x + rect.size.x > ofs_max) {
 						rect.size.x = ofs_max - rect.position.x;
 					}
 					RenderingServer::get_singleton()->canvas_item_add_rect(ci, rect, selection_color);