Merge pull request #31642 from Chaosus/fix_textedit
Disallow undo/redo by user input in readonly TextEdit's
This commit is contained in:
commit
33e531d95b
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue