diff --git a/CHANGELOG.md b/CHANGELOG.md index ac09a8c4..ae459853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * Fix translations about checks/rules/explanations * Add new blocker rule when the layer or group has a trailing space * Fix some casting issue with SIP about the legend +* Add a waiting cursor when saving the CFG file ## 4.0.1 - 2023-11-27 diff --git a/lizmap/plugin.py b/lizmap/plugin.py index ea26f7ea..a02dca98 100755 --- a/lizmap/plugin.py +++ b/lizmap/plugin.py @@ -1030,7 +1030,7 @@ def initGui(self): # connect Lizmap signals and functions self.dlg.buttonBox.button(QDialogButtonBox.Cancel).clicked.connect(self.dlg.close) - self.dlg.buttonBox.button(QDialogButtonBox.Apply).clicked.connect(self.save_cfg_file) + self.dlg.buttonBox.button(QDialogButtonBox.Apply).clicked.connect(self.save_cfg_file_cursor) self.dlg.buttonBox.button(QDialogButtonBox.Ok).clicked.connect(self.ok_button_clicked) self.dlg.buttonBox.button(QDialogButtonBox.Help).clicked.connect(self.show_help_question) @@ -3584,12 +3584,17 @@ def check_global_project_options(self) -> Tuple[bool, str]: def ok_button_clicked(self): """When the OK button is press, we 'apply' and close the dialog.""" - if not self.save_cfg_file(): + if not self.save_cfg_file_cursor(): return # Only close the dialog if no error self.dlg.close() + def save_cfg_file_cursor(self) -> bool: + """ Save CFG file with a waiting cursor. """ + with OverrideCursor(Qt.WaitCursor): + return self.save_cfg_file() + def save_cfg_file( self, lwc_version: LwcVersions = None,