Skip to content

Commit d12bcc0

Browse files
committed
Fix waiting.
1 parent 98c815a commit d12bcc0

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

datashuttle/tui/shared/validate_content.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ async def run_validate_and_dismiss_popup(
246246
)
247247
await worker.wait()
248248
if self.validating_central_popup:
249-
self.validating_central_popup.dismiss()
250-
self.validating_central_popup = None
249+
self._hide_validating_central_popup()
251250

252251
@work(exclusive=True, thread=True)
253252
def validate_project_worker(
@@ -268,6 +267,10 @@ def validate_project_worker(
268267
)
269268

270269
if not success:
270+
if self.validating_central_popup:
271+
self.app.call_from_thread(
272+
self._hide_validating_central_popup,
273+
)
271274
self.app.call_from_thread(
272275
self.parent_class.mainwindow.show_modal_error_dialog,
273276
output,
@@ -276,6 +279,10 @@ def validate_project_worker(
276279
self.app.call_from_thread(self.write_results_to_richlog, output)
277280
self.app.call_from_thread(self._update_logs_label)
278281

282+
def _hide_validating_central_popup(self):
283+
self.validating_central_popup.dismiss()
284+
self.validating_central_popup = None
285+
279286
def _update_logs_label(self) -> None:
280287
"""Update the logs label with the current project logging path."""
281288
assert self.interface is not None

0 commit comments

Comments
 (0)