GTextEditor: Backspace and Delete should work regardless of modifier state.

This commit is contained in:
Andreas Kling 2019-03-08 18:50:14 +01:00
parent 032549d7bf
commit ccda716028
Notes: sideshowbarker 2024-07-19 15:07:05 +09:00

View file

@ -360,7 +360,7 @@ void GTextEditor::keydown_event(GKeyEvent& event)
return;
}
if (!event.modifiers() && event.key() == KeyCode::Key_Backspace) {
if (event.key() == KeyCode::Key_Backspace) {
if (has_selection()) {
delete_selection();
return;
@ -386,7 +386,7 @@ void GTextEditor::keydown_event(GKeyEvent& event)
return;
}
if (!event.modifiers() && event.key() == KeyCode::Key_Delete) {
if (event.key() == KeyCode::Key_Delete) {
if (has_selection()) {
delete_selection();
return;