Skip to content

Commit

Permalink
Fix file searcher no installation (#85)
Browse files Browse the repository at this point in the history
* add asserts to narrow down the issue

* Add test results

* Update README.md status badges.

* fix installation not being set after load.

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
th3w1zard1 and actions-user authored Mar 14, 2024
1 parent d2c2895 commit db5e1a9
Show file tree
Hide file tree
Showing 50 changed files with 4,419 additions and 4,417 deletions.
41 changes: 20 additions & 21 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Tools/HolocronToolset/src/toolset/gui/dialogs/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def __init__(self, parent: QWidget | None, installations: dict[str, HTInstallati
from toolset.uic.dialogs import search # pylint: disable=C0415 # noqa: PLC0415
self.ui = search.Ui_Dialog()
self.ui.setupUi(self)
assert len(installations) > 0, "No installations passed to FileSearcher"

self._installations: dict[str, HTInstallation] = installations
for name, installation in installations.items():
Expand All @@ -62,6 +63,7 @@ def accept(self):
None
"""
installation: HTInstallation = self.ui.installationSelect.currentData()
assert bool(installation), "No installation chosen in FileSearcher"
caseSensitive = self.ui.caseSensitiveRadio.isChecked()
filenamesOnly = self.ui.filenamesOnlyCheck.isChecked()
text = self.ui.searchTextEdit.text()
Expand Down
1 change: 1 addition & 0 deletions Tools/HolocronToolset/src/toolset/gui/windows/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ def task(active: HTInstallation | None = None):
self.dogObserver = Observer()
self.dogObserver.schedule(self.dogHandler, self.active.path(), recursive=True)
self.dogObserver.start()
self.installations[name] = self.active

self.settings.installations()[name].path = path

Expand Down

This file was deleted.

Loading

0 comments on commit db5e1a9

Please sign in to comment.