Preserve selected add-ons

This commit is contained in:
Glutanimate 2019-02-23 10:10:05 +01:00
parent 15a83df126
commit 195ca93cfe

View File

@ -458,15 +458,15 @@ class AddonsDialog(QDialog):
self.addons = [(self.annotatedName(d), d) for d in mgr.allAddons()]
self.addons.sort()
selected = set(self.selectedAddons())
addonList.clear()
for name, dir in self.addons:
item = QListWidgetItem(name, addonList)
if not mgr.isEnabled(dir):
item.setForeground(Qt.gray)
if self.addons:
addonList.setCurrentRow(0)
if dir in selected:
item.setSelected(True)
addonList.repaint()