mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Pamhyr: Add waiting dialog at file loading.
This commit is contained in:
1 parent
af779a1880
commit
4222503961
4 files changed
+228
-2
No files matched your search
+19
-2
@@ -49,6 +49,7 @@ from View.Tools.ListedSubWindow import ListedSubWindow
|
||||
from View.DummyWindow import DummyWindow
|
||||
|
||||
from View.Translate import MainTranslate
|
||||
from View.WaitingDialog import WaitingDialog
|
||||
|
||||
from View.MainWindowTabInfo import WidgetInfo
|
||||
from View.MainWindowTabChecker import WidgetChecker
|
||||
@@ -931,7 +932,19 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
|
||||
if dialog.exec_():
|
||||
file_name = dialog.selectedFiles()
|
||||
self.open_study(file_name[0])
|
||||
|
||||
def fn():
|
||||
self._tmp_study = Study.open(file_name[0])
|
||||
|
||||
dlg = WaitingDialog(
|
||||
payload_fn=fn,
|
||||
title="waiting_load",
|
||||
parent=self
|
||||
)
|
||||
dlg.exec_()
|
||||
|
||||
self.set_model(self._tmp_study)
|
||||
self.set_title()
|
||||
|
||||
def open_new_study(self):
|
||||
"""Open dialog to set new study
|
||||
@@ -1260,7 +1273,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
name=name
|
||||
)
|
||||
|
||||
dlg = ReadingResultsDialog(reading_fn=reading_fn, parent=self)
|
||||
dlg = WaitingDialog(
|
||||
payload_fn=reading_fn,
|
||||
title="waiting_result",
|
||||
parent=self
|
||||
)
|
||||
dlg.exec_()
|
||||
results = self._tmp_results
|
||||
|
||||
|
||||
Reference in new issue
Block a user