eric7/Preferences/ConfigurationDialog.py

branch
eric7
changeset 8943
23f9c7b9e18e
parent 8888
e374ffbc1484
equal deleted inserted replaced
8940:e91951ff3bbd 8943:23f9c7b9e18e
8 """ 8 """
9 9
10 import contextlib 10 import contextlib
11 import enum 11 import enum
12 import os 12 import os
13 import time
13 import types 14 import types
14 15
15 from PyQt6.QtCore import pyqtSignal, pyqtSlot, Qt, QMetaObject, QRect 16 from PyQt6.QtCore import pyqtSignal, pyqtSlot, Qt, QMetaObject, QRect
16 from PyQt6.QtGui import QPixmap 17 from PyQt6.QtGui import QPixmap
17 from PyQt6.QtWidgets import ( 18 from PyQt6.QtWidgets import (
916 def setPreferences(self): 917 def setPreferences(self):
917 """ 918 """
918 Public method called to store the selected values into the preferences 919 Public method called to store the selected values into the preferences
919 storage. 920 storage.
920 """ 921 """
922 now = time.monotonic()
921 for pageData in self.configItems.values(): 923 for pageData in self.configItems.values():
922 if pageData[-1]: 924 if pageData[-1]:
923 pageData[-1].save() 925 pageData[-1].save()
924 # page was loaded (and possibly modified) 926 # page was loaded (and possibly modified)
925 QApplication.processEvents() # ensure HMI is responsive 927 if time.monotonic() - now > 0.01:
928 QApplication.processEvents() # ensure HMI is responsive
929 now = time.monotonic()
926 930
927 def on_buttonBox_clicked(self, button): 931 def on_buttonBox_clicked(self, button):
928 """ 932 """
929 Private slot called by a button of the button box clicked. 933 Private slot called by a button of the button box clicked.
930 934

eric ide

mercurial