Another use of checkState() that needs to be changed

This commit is contained in:
Kovid Goyal 2022-07-16 08:07:10 +05:30
parent 63adfd3a2c
commit 3f4c4b318a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -47,7 +47,7 @@ class PluginWidget(Widget, Ui_Form):
def get_value_handler(self, g): def get_value_handler(self, g):
if g is not self.opt_markdown_extensions: if g is not self.opt_markdown_extensions:
return Widget.get_value_handler(self, g) return Widget.get_value_handler(self, g)
return ', '.join(str(i.data(Qt.ItemDataRole.UserRole) or '') for i in itervalues(self.md_map) if i.checkState()) return ', '.join(str(i.data(Qt.ItemDataRole.UserRole) or '') for i in self.md_map.values() if i.checkState() == Qt.CheckState.Checked)
def connect_gui_obj_handler(self, g, f): def connect_gui_obj_handler(self, g, f):
if g is not self.opt_markdown_extensions: if g is not self.opt_markdown_extensions: