diff options
| author | Ignacio Etcheverry | 2016-06-23 23:03:32 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry | 2016-06-24 14:26:40 +0200 |
| commit | f1e75527222b0e01e04c64db26e5f1e0a0017922 (patch) | |
| tree | c589f96d6e8b03bc57ad743b5235ad79f45e4f3d /scene/gui/text_edit.cpp | |
| parent | 60fa2b98151ae2fc87d77ef52372eec82f7754dd (diff) | |
| download | godot-f1e75527222b0e01e04c64db26e5f1e0a0017922.tar.gz godot-f1e75527222b0e01e04c64db26e5f1e0a0017922.tar.zst godot-f1e75527222b0e01e04c64db26e5f1e0a0017922.zip | |
Fix weird deselection behaviour with text field
- TextEdit will now deselect if Ctrl+Left/Right is pressed
- TextEdit and LineEdit no longer deselect text when Alt is pressed (except with Apple style keys)
Diffstat (limited to '')
| -rw-r--r-- | scene/gui/text_edit.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 9342d077e..6fd6137ac 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -2065,6 +2065,12 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { if (k.mod.shift) _pre_shift_selection(); +#ifdef APPLE_STYLE_KEYS + else +#else + else if (!k.mod.alt) +#endif + deselect(); #ifdef APPLE_STYLE_KEYS if (k.mod.command) { @@ -2118,6 +2124,12 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { if (k.mod.shift) _pre_shift_selection(); +#ifdef APPLE_STYLE_KEYS + else +#else + else if (!k.mod.alt) +#endif + deselect(); #ifdef APPLE_STYLE_KEYS if (k.mod.command) { |
