diff --git a/activity_browser/ui/widgets/dialog.py b/activity_browser/ui/widgets/dialog.py index 3f20787ce..9386d2e57 100644 --- a/activity_browser/ui/widgets/dialog.py +++ b/activity_browser/ui/widgets/dialog.py @@ -524,7 +524,7 @@ def __init__(self, version, parent=None): self.biosphere_thread.start() # finally, check if patches are available for this version and apply them - self.check_patches() + #self.biosphere_thread.finished.connect(self.check_patches) @Slot(int, str, name='updateThread') def update_progress(self, current: int, text: str) -> None: @@ -534,6 +534,7 @@ def update_progress(self, current: int, text: str) -> None: def finished(self, result: int = None) -> None: self.biosphere_thread.exit(result or 0) self.setValue(3) + self.check_patches() signals.change_project.emit(bw.projects.current) signals.project_selected.emit() diff --git a/tests/test_add_default_data.py b/tests/test_add_default_data.py index 4afa0d38a..d03aa1b3f 100644 --- a/tests/test_add_default_data.py +++ b/tests/test_add_default_data.py @@ -35,6 +35,10 @@ def test_add_default_data(qtbot, ab_app, monkeypatch): QtCore.Qt.LeftButton ) + # The biosphere3 update finishes with a 'database_changed' signal. + with qtbot.waitSignal(signals.database_changed, timeout=2 * 60 * 1000): # allow 2 mins for biosphere update + pass + # biosphere was installed assert 'biosphere3' in bw.databases