From 004db74b7aa664e7d481d8431e6011c9ef6ebbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Moreira?= Date: Mon, 17 Feb 2020 18:59:57 -0300 Subject: [PATCH] [fix][ui] not displaying some priority search results at the top of the table when filtering by name --- bauh/view/qt/window.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bauh/view/qt/window.py b/bauh/view/qt/window.py index a9938232..05a7526a 100755 --- a/bauh/view/qt/window.py +++ b/bauh/view/qt/window.py @@ -692,9 +692,9 @@ class ManageWindow(QWidget): setattr(self, attr, checked) checkbox.blockSignals(False) - def _gen_filters(self, updates: int = 0, ignore_updates: bool = False, only_apps: bool = None) -> dict: + def _gen_filters(self, updates: int = 0, ignore_updates: bool = False) -> dict: return { - 'only_apps': self.filter_only_apps if only_apps is None else only_apps, + 'only_apps': False if self.search_performed else self.filter_only_apps, 'type': self.type_filter, 'category': self.category_filter, 'updates': False if ignore_updates else self.filter_updates, @@ -774,9 +774,7 @@ class ManageWindow(QWidget): def _apply_filters(self, pkgs_info: dict, ignore_updates: bool): pkgs_info['pkgs_displayed'] = [] - filters = self._gen_filters(updates=pkgs_info['updates'], - ignore_updates=ignore_updates, - only_apps=False if self.search_performed else None) + filters = self._gen_filters(updates=pkgs_info['updates'], ignore_updates=ignore_updates) for pkgv in pkgs_info['pkgs']: commons.apply_filters(pkgv, filters, pkgs_info)