Kaynağa Gözat

Merge pull request #53202 from timothyqiu/line-edit-undo

Rémi Verschelde 4 yıl önce
ebeveyn
işleme
37a484ebbb
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      scene/gui/line_edit.cpp

+ 3 - 2
scene/gui/line_edit.cpp

@@ -1919,8 +1919,6 @@ void LineEdit::_bind_methods() {
 }
 
 LineEdit::LineEdit() {
-	undo_stack_pos = nullptr;
-	_create_undo_state();
 	align = ALIGN_LEFT;
 	cached_width = 0;
 	cached_placeholder_width = 0;
@@ -1938,6 +1936,9 @@ LineEdit::LineEdit() {
 	shortcut_keys_enabled = true;
 	selecting_enabled = true;
 
+	undo_stack_pos = nullptr;
+	_create_undo_state();
+
 	deselect();
 	set_focus_mode(FOCUS_ALL);
 	set_default_cursor_shape(CURSOR_IBEAM);