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