Initialize readonly/editable in LineEdit and TextEdit controls
This commit is contained in:
parent
e2375f487c
commit
d8a5fcd3d1
2 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue