diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-22 11:36:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 11:36:26 +0200 |
commit | db084811b4139c1d8a3c68730ae042d27d7f8675 (patch) | |
tree | 53560043e46be0afe83ae8b7df9ec89beaa3aced | |
parent | bc17704fd704c7f0789a8204001c078fa1ec8883 (diff) | |
parent | d8a5fcd3d1a1503c744499cabcf85856a63b3d19 (diff) |
Merge pull request #29087 from ibrahn/init-text-gui-vars
Initialize readonly/editable in LineEdit and TextEdit controls
-rw-r--r-- | scene/gui/line_edit.cpp | 1 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 2d18a80833..ed74851755 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1656,6 +1656,7 @@ LineEdit::LineEdit() { context_menu_enabled = true; menu = memnew(PopupMenu); add_child(menu); + editable = false; // initialise to opposite first, so we get past the early-out in set_editable set_editable(true); menu->connect("id_pressed", this, "menu_option"); expand_to_text_length = false; diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 1a000d8da5..380b670368 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -6661,6 +6661,7 @@ TextEdit::TextEdit() { context_menu_enabled = true; menu = memnew(PopupMenu); add_child(menu); + readonly = true; // initialise to opposite first, so we get past the early-out in set_readonly set_readonly(false); menu->connect("id_pressed", this, "menu_option"); first_draw = true; |