You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-04 19:21:46 +00:00
Initialize readonly/editable in LineEdit and TextEdit controls
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user