Pamhyr2: Add save action (ctrl+s) in each pamhyr window.

This commit is contained in:
parouby committed 2025-10-31 14:43:01 +01:00
1 parent abe24611b3
commit 7ca6e69526
2 files changed
+23 -2

No files matched your search

+9 -2
View File
@@ -637,7 +637,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
logger.info(f"Open Study - {self._study.name}")
self.set_title()
def save_study(self):
def _save(self, source):
self.save_study(progress_parent=source)
def save_study(self, progress_parent=None):
"""Save current study
Save current study, if study as no associate file, open a
@@ -667,11 +670,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
self._backup_timer.blockSignals(True)
self._save_mutex.lock()
parent = self
if progress_parent is not None:
parent = progress_parent
sql_request_count = self._study.sql_save_request_count()
progress = QProgressDialog(
"Saving...", None,
0, sql_request_count,
parent=self
parent=parent
)
progress.setWindowModality(Qt.WindowModal)
progress.setValue(0)