mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibGUI: Stop editing in views when the view is hidden
This fixes an issue in FileManager where an editor opened in the table view mode would remain open after switching to the icon mode.
This commit is contained in:
@@ -445,6 +445,12 @@ void AbstractView::set_edit_triggers(unsigned triggers)
|
||||
m_edit_triggers = triggers;
|
||||
}
|
||||
|
||||
void AbstractView::hide_event(HideEvent& event)
|
||||
{
|
||||
stop_editing();
|
||||
ScrollableWidget::hide_event(event);
|
||||
}
|
||||
|
||||
void AbstractView::keydown_event(KeyEvent& event)
|
||||
{
|
||||
if (event.key() == KeyCode::Key_F2) {
|
||||
|
||||
Reference in New Issue
Block a user