1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 22:54:57 +00:00

LibGUI+FileManager: Add GAbstractView::on_selection_change hook

This hook will be called whenever the view's selection changes somehow.
Use this in the FileManager to keep the left and right views in sync.
This commit is contained in:
Andreas Kling 2019-09-07 21:34:26 +02:00
parent 9d97781e37
commit 6dec328af7
3 changed files with 6 additions and 2 deletions

View file

@ -100,5 +100,8 @@ void GAbstractView::activate(const GModelIndex& index)
void GAbstractView::notify_selection_changed(Badge<GModelSelection>)
{
did_update_selection();
if (on_selection_change)
on_selection_change();
update();
}