diff --git a/python/PyQt6/gui/additions/qgssettingsenumflageditorwrapper.py b/python/PyQt6/gui/additions/qgssettingsenumflageditorwrapper.py index 7b79feb18b55..245b0470a35f 100644 --- a/python/PyQt6/gui/additions/qgssettingsenumflageditorwrapper.py +++ b/python/PyQt6/gui/additions/qgssettingsenumflageditorwrapper.py @@ -75,8 +75,8 @@ def createEditorPrivate(self, parent=None): def configureEditorPrivate(self, editor: QComboBox, setting: QgsSettingsEntryBase): self.setting = setting - self.editor = editor - if editor is not None: + if isinstance(editor, QComboBox): + self.editor = editor for i in range(self.setting.metaEnum().keyCount()): value = self.setting.metaEnum().value(i) key = self.setting.metaEnum().key(i)