diff --git a/Libraries/LibGUI/GDirectoryModel.cpp b/Libraries/LibGUI/GDirectoryModel.cpp index 7724efef0e..ac7abf59e9 100644 --- a/Libraries/LibGUI/GDirectoryModel.cpp +++ b/Libraries/LibGUI/GDirectoryModel.cpp @@ -351,5 +351,7 @@ void GDirectoryModel::open(const StringView& a_path) int rc = read(m_notifier->fd(), buffer, sizeof(buffer)); ASSERT(rc >= 0); }; + if (on_path_change) + on_path_change(); update(); } diff --git a/Libraries/LibGUI/GDirectoryModel.h b/Libraries/LibGUI/GDirectoryModel.h index 580454ec65..ec7fae7314 100644 --- a/Libraries/LibGUI/GDirectoryModel.h +++ b/Libraries/LibGUI/GDirectoryModel.h @@ -34,6 +34,7 @@ public: size_t bytes_in_files() const { return m_bytes_in_files; } Function on_thumbnail_progress; + Function on_path_change; struct Entry { String name;