[fix][ui] not updating the type filters if only type is available after refreshing the table

This commit is contained in:
Vinicius Moreira
2020-06-15 10:46:01 -03:00
parent 643b7b2593
commit b69a0e7c4f
2 changed files with 3 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- displaying empty categories
- not scrolling the table to top after updating its content
- not calling initial required tasks after enabling a new package type on settings
- not updating the type filters if only type is available after refreshing the table
- minor fixes
- Tray
- update notifications not working on Ubuntu 18.04

View File

@@ -864,7 +864,7 @@ class ManageWindow(QWidget):
if not keeping_selected:
self.type_filter = self.any_type_filter
if available_types and len(available_types) > 1:
if available_types:
if self.combo_filter_type.count() > 1:
for _ in range(self.combo_filter_type.count() - 1):
self.combo_filter_type.removeItem(1)
@@ -887,7 +887,7 @@ class ManageWindow(QWidget):
self.combo_filter_type.blockSignals(True)
self.combo_filter_type.setCurrentIndex(sel_type if sel_type > -1 else 0)
self.combo_filter_type.blockSignals(False)
self.ref_combo_filter_type.setVisible(True)
self.ref_combo_filter_type.setVisible(len(available_types) > 1)
else:
self.ref_combo_filter_type.setVisible(False)