mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-18 09:56:50 +01:00
Fix LineEdit caret after using arrow key to deselect
This commit is contained in:
parent
756795a486
commit
f0f2a9d960
@ -402,12 +402,12 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
|
|||||||
if (!k->get_alt())
|
if (!k->get_alt())
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
shift_selection_check_pre(k->get_shift());
|
|
||||||
if (selection.enabled && !k->get_shift()) {
|
if (selection.enabled && !k->get_shift()) {
|
||||||
set_cursor_position(selection.begin);
|
set_cursor_position(selection.begin);
|
||||||
deselect();
|
deselect();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
shift_selection_check_pre(k->get_shift());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef APPLE_STYLE_KEYS
|
#ifdef APPLE_STYLE_KEYS
|
||||||
@ -451,11 +451,15 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
|
|||||||
FALLTHROUGH;
|
FALLTHROUGH;
|
||||||
}
|
}
|
||||||
case KEY_RIGHT: {
|
case KEY_RIGHT: {
|
||||||
|
#ifndef APPLE_STYLE_KEYS
|
||||||
|
if (!k->get_alt())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
if (selection.enabled && !k->get_shift()) {
|
if (selection.enabled && !k->get_shift()) {
|
||||||
set_cursor_position(selection.end);
|
set_cursor_position(selection.end);
|
||||||
deselect();
|
deselect();
|
||||||
break;
|
break;
|
||||||
} else {
|
}
|
||||||
shift_selection_check_pre(k->get_shift());
|
shift_selection_check_pre(k->get_shift());
|
||||||
}
|
}
|
||||||
#ifdef APPLE_STYLE_KEYS
|
#ifdef APPLE_STYLE_KEYS
|
||||||
|
Loading…
Reference in New Issue
Block a user