Commit 6c9e90ce authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

MainWindow: Add progress dialog for save as method.

Showing with 14 additions and 1 deletion
+14 -1
......@@ -440,7 +440,20 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
else:
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 #
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment