[fix][ui] table overwrite effect when updating its content

This commit is contained in:
Vinicius Moreira
2020-06-03 15:13:50 -03:00
parent c98433a740
commit d1fcb19e6e
3 changed files with 11 additions and 2 deletions

View File

@@ -254,7 +254,11 @@ class AppsTable(QTableWidget):
self.window.manager.cache_to_disk(pkg=app.model, icon_bytes=icon_data['bytes'], only_icon=True)
def update_packages(self, pkgs: List[PackageView], update_check_enabled: bool = True):
self.setRowCount(len(pkgs) if pkgs else 0)
self.setRowCount(0) # removes the overwrite effect when updates the table
if pkgs:
self.setRowCount(len(pkgs))
self.setEnabled(True)
if pkgs: