From 5b85c3716ffc39524d9bf6d4f647f9bd39b2d1cc Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 21 Aug 2020 16:19:27 -0300 Subject: [PATCH] [ui] fix -> icons that cannot be rendered are being displayed as an empty space --- CHANGELOG.md | 1 + bauh/view/qt/apps_table.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94ad2806..83f260e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - UI - crashing when nothing can be upgraded - random C++ wrapper errors with some forms due to missing references + - icons that cannot be rendered are being displayed as an empty space (now the type icon is displayed instead) ## [0.9.6] 2020-06-26 diff --git a/bauh/view/qt/apps_table.py b/bauh/view/qt/apps_table.py index 397f4165..380e05a4 100644 --- a/bauh/view/qt/apps_table.py +++ b/bauh/view/qt/apps_table.py @@ -426,7 +426,11 @@ class AppsTable(QTableWidget): else: try: icon = QIcon.fromTheme(icon_path) - self.icon_cache.add_non_existing(pkg.model.icon_url, {'icon': icon, 'bytes': None}) + + if icon.isNull(): + icon = QIcon(pkg.model.get_default_icon_path()) + else: + self.icon_cache.add_non_existing(pkg.model.icon_url, {'icon': icon, 'bytes': None}) except: icon = QIcon(pkg.model.get_default_icon_path())