Merge pull request #31642 from Chaosus/fix_textedit

Disallow undo/redo by user input in readonly TextEdit's
This commit is contained in:
Rémi Verschelde 2019-08-25 10:47:53 +02:00 committed by GitHub
commit 33e531d95b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3506,6 +3506,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_Z: {
if (readonly) {
break;
}
if (!k->get_command()) {
scancode_handled = false;
break;
@ -3518,6 +3522,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} break;
case KEY_Y: {
if (readonly) {
break;
}
if (!k->get_command()) {
scancode_handled = false;
break;