feat(files): sync Source panel browser with chosen save directory

This commit is contained in:
jack
2026-07-10 14:37:29 -07:00
parent bdc667b2ed
commit e2ce8778e0
5 changed files with 37 additions and 3 deletions
+10
View File
@@ -37,6 +37,16 @@ class FileBrowser(QObject):
return str(self._current_directory)
# ===== Directory Selection =====
@Slot(str)
def setCurrentDirectory(self, path: str) -> None:
"""Point the browser at `path` without opening a native dialog.
Used to keep this directory in sync with DeviceController.saveDataDir
when the user picks a save folder elsewhere in the app.
"""
self._set_current_directory(Path(path))
self._refresh_files(show_empty_message=False)
@Slot()
def chooseDirectory(self) -> None:
selected_dir = QFileDialog.getExistingDirectory(