Preserve selected add-ons
This commit is contained in:
parent
15a83df126
commit
195ca93cfe
@ -458,15 +458,15 @@ class AddonsDialog(QDialog):
|
|||||||
|
|
||||||
self.addons = [(self.annotatedName(d), d) for d in mgr.allAddons()]
|
self.addons = [(self.annotatedName(d), d) for d in mgr.allAddons()]
|
||||||
self.addons.sort()
|
self.addons.sort()
|
||||||
|
|
||||||
|
selected = set(self.selectedAddons())
|
||||||
addonList.clear()
|
addonList.clear()
|
||||||
for name, dir in self.addons:
|
for name, dir in self.addons:
|
||||||
item = QListWidgetItem(name, addonList)
|
item = QListWidgetItem(name, addonList)
|
||||||
if not mgr.isEnabled(dir):
|
if not mgr.isEnabled(dir):
|
||||||
item.setForeground(Qt.gray)
|
item.setForeground(Qt.gray)
|
||||||
|
if dir in selected:
|
||||||
if self.addons:
|
item.setSelected(True)
|
||||||
addonList.setCurrentRow(0)
|
|
||||||
|
|
||||||
addonList.repaint()
|
addonList.repaint()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user