mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 19:45:08 +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:
parent
53f3313cee
commit
d8553a6406
2 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue