mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
MainWindow: Add progress dialog for save as method.
This commit is contained in:
1 parent
b99be5a280
commit
6c9e90ceaf
1 file changed
+14
-1
+14
-1
@@ -440,7 +440,20 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||||||
else:
|
else:
|
||||||
self._study.filename = file_name + ".pamhyr"
|
self._study.filename = file_name + ".pamhyr"
|
||||||
|
|
||||||
self._study.save()
|
sql_request_count = self._study.sql_save_request_count()
|
||||||
|
progress = QProgressDialog(
|
||||||
|
"Saving...", None,
|
||||||
|
0, sql_request_count,
|
||||||
|
parent=self
|
||||||
|
)
|
||||||
|
progress.setWindowModality(Qt.WindowModal)
|
||||||
|
progress.setValue(0)
|
||||||
|
|
||||||
|
logger.info("Save...")
|
||||||
|
self._study.save(
|
||||||
|
progress=lambda: progress.setValue(progress.value() + 1)
|
||||||
|
)
|
||||||
|
logger.info("Done")
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# MSG AND DIALOG #
|
# MSG AND DIALOG #
|
||||||
|
|||||||
Reference in new issue
Block a user