From 97f8217483776e32a566620d466a70f10377de33 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Tue, 15 Oct 2024 10:30:12 +0200 Subject: [PATCH] isinstance --- .../PyQt6/gui/additions/qgssettingsenumflageditorwrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)