1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

LibGUI: Let Delete remove selections greater than 1 in GlyphMapWidget

Updates keydown_event() to work with the new bubbling mechanism
for action shortcuts.
This commit is contained in:
thankyouverycool 2022-11-17 17:27:58 -05:00 committed by Andreas Kling
parent 92a75ccaed
commit ef30073127

View file

@ -259,11 +259,9 @@ void GlyphMapWidget::doubleclick_event(MouseEvent& event)
void GlyphMapWidget::keydown_event(KeyEvent& event)
{
Widget::keydown_event(event);
int range_offset = m_active_range.first;
if (!event.ctrl() && !event.shift()) {
if (!event.ctrl() && !event.shift() && event.key() != KeyCode::Key_Delete) {
m_selection.set_size(1);
m_selection.set_start(m_active_glyph);
}
@ -335,6 +333,8 @@ void GlyphMapWidget::keydown_event(KeyEvent& event)
set_active_glyph(end_of_row);
return;
}
event.ignore();
}
void GlyphMapWidget::did_change_font()