Skip to content

Reset File Explorer model on build/session events - #7

Merged
H1ghSyst3m merged 1 commit into
mainfrom
fix/file-explorer-empy-view
Feb 7, 2026
Merged

H1ghSyst3m merged 1 commit into
mainfrom
fix/file-explorer-empy-view

Conversation

@H1ghSyst3m

Copy link
Copy Markdown
Owner

Fix FileExplorer showing empty content after folder recreate operations by forcing QFileSystemModel reset.

Problem

QFileSystemModel maintains watchers to deleted directory inodes, causing empty views when folders are recreated.

Solution

Added FileExplorer.reset_model() method that recreates the model and releases stale filesystem watchers.

Called reset_model() after all destructive operations:

  • cleanCurrentBuildFolder() (Clear button)
  • onNewSession() (New Session menu)
  • onCleanContent() (Clean Content context menu)

Existing methods like setRootPath() don't release inode watchers—full model replacement is required.

Add FileExplorer.reset_model to reinitialize the QFileSystemModel, set the root path, and clean up the old model to avoid stale views or leaks. Call reset_model when setting the content directory after loading a build, after clearing a build's folder, and after cleaning content from the BuildList UI so the file tree refreshes properly. Also update CHANGELOG.md with a v2.0.1 entry noting the fix.
@H1ghSyst3m
H1ghSyst3m merged commit ef1a800 into main Feb 7, 2026
1 check passed
@H1ghSyst3m
H1ghSyst3m deleted the fix/file-explorer-empy-view branch February 7, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant