eric7/Preferences/ConfigurationDialog.py

branch
eric7
changeset 8943
23f9c7b9e18e
parent 8888
e374ffbc1484
diff -r e91951ff3bbd -r 23f9c7b9e18e eric7/Preferences/ConfigurationDialog.py
--- a/eric7/Preferences/ConfigurationDialog.py	Mon Feb 07 22:02:35 2022 +0100
+++ b/eric7/Preferences/ConfigurationDialog.py	Tue Feb 08 16:21:09 2022 +0100
@@ -10,6 +10,7 @@
 import contextlib
 import enum
 import os
+import time
 import types
 
 from PyQt6.QtCore import pyqtSignal, pyqtSlot, Qt, QMetaObject, QRect
@@ -918,11 +919,14 @@
         Public method called to store the selected values into the preferences
         storage.
         """
+        now = time.monotonic()
         for pageData in self.configItems.values():
             if pageData[-1]:
                 pageData[-1].save()
                 # page was loaded (and possibly modified)
-                QApplication.processEvents()    # ensure HMI is responsive
+                if time.monotonic() - now > 0.01:
+                    QApplication.processEvents()    # ensure HMI is responsive
+                    now = time.monotonic()
         
     def on_buttonBox_clicked(self, button):
         """

eric ide

mercurial