From 5553414205964e133fb79674acf009c5df2f8f4b Mon Sep 17 00:00:00 2001 From: glubsy Date: Wed, 30 Dec 2020 23:18:42 +0100 Subject: [PATCH] Fix updating QTableView on input * When clicking on the test regex button or editing the test input field, the tableView doesn't update its data properly. * Somehow QTableView.update() doesn't request the data from the model. * The workaround is to call refresh on the model directly, which will in turn update its view. --- qt/exclude_list_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/exclude_list_dialog.py b/qt/exclude_list_dialog.py index b28be1e5..557dd6b2 100644 --- a/qt/exclude_list_dialog.py +++ b/qt/exclude_list_dialog.py @@ -118,7 +118,7 @@ class ExcludeListDialog(QDialog): return # if at least one row matched, we know whether table is highlighted or not self._row_matched = self.model.test_string(input_text) - self.tableView.update() + self.table.refresh() input_regex = self.inputLine.text() if not input_regex: @@ -146,7 +146,7 @@ class ExcludeListDialog(QDialog): if self._row_matched: self._row_matched = False self.model.reset_rows_highlight() - self.tableView.update() + self.table.refresh() def display_help_message(self): self.app.show_message(tr("""\