File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -692,9 +692,8 @@ def open_bc_loader_dialog(self) -> None: # UI minimale
692692 | Qt .ItemIsSelectable
693693 | Qt .ItemIsDragEnabled
694694 )
695- item .setCheckState (
696- Qt .Checked if (Qt is not None and enabled ) else 2 if enabled else 0
697- )
695+ if Qt is not None :
696+ item .setCheckState (Qt .CheckState .Checked if enabled else Qt .CheckState .Unchecked )
698697 lst .addItem (item )
699698 layout .addWidget (lst )
700699
@@ -748,7 +747,7 @@ def do_save():
748747 for i in range (lst .count ()):
749748 it = lst .item (i )
750749 pid = it .data (0x0100 ) or it .text ()
751- en = it .checkState () == ( Qt .Checked if Qt is not None else 2 )
750+ en = it .checkState () == Qt .CheckState . Checked if Qt is not None else False
752751 new_plugins [str (pid )] = {"enabled" : bool (en ), "priority" : i }
753752 order_ids .append (str (pid ))
754753 cfg_out : dict [str , Any ] = dict (cfg ) if isinstance (cfg , dict ) else {}
You can’t perform that action at this time.
0 commit comments