[view.qt.apps_table] improvement: calling pkg.get_custom_actions once to improve memory usage

This commit is contained in:
Vinicius Moreira
2021-12-17 14:59:16 -03:00
parent 3296fd34da
commit bd02ef2d4c

View File

@@ -154,8 +154,9 @@ class PackagesTable(QTableWidget):
button_name=button_name, button_name=button_name,
action=ignore_updates)) action=ignore_updates))
if bool(pkg.model.get_custom_actions()): custom_actions = pkg.model.get_custom_actions()
actions = [self._map_custom_action(pkg, a, menu_row) for a in pkg.model.get_custom_actions()] if custom_actions:
actions = [self._map_custom_action(pkg, a, menu_row) for a in custom_actions]
menu_row.addActions(actions) menu_row.addActions(actions)
menu_row.adjustSize() menu_row.adjustSize()