- installed an eventFilter for the Sliders in the Preferences tab such that only if a slider has focus the mouse wheel will change its value

- in Preferences made sure that the changes of the scrollbar no longer interfere with signalling changes
This commit is contained in:
Marius Stanciu
2022-03-12 18:16:15 +02:00
committed by Marius
parent 37e31b0159
commit dc11f1be50
4 changed files with 16 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ if '_' not in builtins.__dict__:
_ = gettext.gettext
class PreferencesUIManager:
class PreferencesUIManager(QtCore.QObject):
def __init__(self, defaults: AppDefaults, data_path: str, ui, inform, options):
"""
@@ -26,6 +26,7 @@ class PreferencesUIManager:
:param inform: a pyqtSignal used to display information's in the StatusBar of the GUI
:param options: a dict holding the current defaults loaded in the application
"""
super(PreferencesUIManager, self).__init__()
self.defaults = defaults
self.data_path = data_path
@@ -1239,6 +1240,9 @@ class PreferencesUIManager:
Will color the Preferences tab text to Red color.
:return:
"""
if isinstance(self.sender(), QtWidgets.QScrollBar):
return
if self.preferences_changed_flag is False:
self.inform.emit('[WARNING_NOTCL] %s' % _("Preferences edited but not saved."))