Disallow undo/redo in readonly TextEdit's
This commit is contained in:
parent
a7aacfef7f
commit
4efa1b6906
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