UI: sort add-ons by name
Previously add-ons were sorted by category & name, remove the category only sorting by name since the category is no longer displayed and isn't part of extension meta-data. Now the add-ons are sorted by name (case insensitive). Details: - Store add-ons modules sorted to avoid having to sort on every redraw. - addon_utils.modules() now returns an iterator.
This commit is contained in:
@@ -37,9 +37,8 @@ def _init_addon_exclusions():
|
||||
|
||||
def addon_modules_sorted():
|
||||
# Pass in an empty module cache to prevent `addon_utils` local module cache being manipulated.
|
||||
modules = addon_utils.modules(module_cache={})
|
||||
modules[:] = [
|
||||
mod for mod in modules
|
||||
modules = [
|
||||
mod for mod in addon_utils.modules(module_cache={})
|
||||
if not (mod.__file__.startswith(EXCLUDE_DIRECTORIES))
|
||||
if not (mod.__name__ in EXCLUDE_ADDONS)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user