From ec514b99d9b3d34bf34c97b36d949bd10b089fd7 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Tue, 29 Oct 2019 12:08:58 -0300 Subject: [PATCH] [suggestions] showing suggestions if the user changes the available types and there are no applications installed --- CHANGELOG.md | 1 + bauh/view/qt/gem_selector.py | 1 + bauh/view/qt/window.py | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fd4f9bc..2642cbb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Improvements - Snap - not showing **License** in the info window if it defined as **unset** +- showing suggestions if the user changes the application types available and there are no applications installed - i18n: spanish contributions by [fitojb](https://github.com/fitojb) - minor labels improvements diff --git a/bauh/view/qt/gem_selector.py b/bauh/view/qt/gem_selector.py index 6dda234e..be810f7f 100644 --- a/bauh/view/qt/gem_selector.py +++ b/bauh/view/qt/gem_selector.py @@ -91,6 +91,7 @@ class GemSelectorPanel(QWidget): self.manager.reset_cache() self.manager.prepare() self.window.verify_warnings() + self.window.types_changed = True self.window.refresh_apps() self.close() diff --git a/bauh/view/qt/window.py b/bauh/view/qt/window.py index a4272147..16da819d 100755 --- a/bauh/view/qt/window.py +++ b/bauh/view/qt/window.py @@ -284,6 +284,7 @@ class ManageWindow(QWidget): self.progress_controll_enabled = True self.recent_installation = False self.recent_uninstall = False + self.types_changed = False self.dialog_about = None self.first_refresh = suggestions @@ -474,6 +475,7 @@ class ManageWindow(QWidget): self.update_pkgs(res['installed'], as_installed=as_installed, types=res['types'], keep_filters=self.recent_uninstall and res['types']) self.first_refresh = False self.recent_uninstall = False + self.types_changed = False self._hide_fields_after_recent_installation() def uninstall_app(self, app: PackageView): @@ -640,7 +642,7 @@ class ManageWindow(QWidget): commons.apply_filters(pkgv, filters, pkgs_info) if pkgs_info['apps_count'] == 0: - if self.first_refresh: + if self.first_refresh or self.types_changed: self._begin_search('') self.thread_suggestions.start() return