From 56d66ce15db7150da247c322ae5fbdab97e16cf6 Mon Sep 17 00:00:00 2001 From: destinyk <destiny.kuehn@student.nmt.edu> Date: Wed, 17 Jan 2024 14:12:41 -0700 Subject: [PATCH] solve issue 12 --- mseedpeek/mseedpeek.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mseedpeek/mseedpeek.py b/mseedpeek/mseedpeek.py index 4824bc5..126b628 100644 --- a/mseedpeek/mseedpeek.py +++ b/mseedpeek/mseedpeek.py @@ -1311,25 +1311,24 @@ class MainWindow(QWidget): def select_keys(self): """ + Display blocks from selected key """ selectkey = self.unique_box.keys_menu.currentText().split(":") if selectkey[0] == "*": self.fill_unique() return - unique_item = QTreeWidgetItem() - line = [] self.unique_box.unique_info_tree.clear() for key in self.unique_list: if selectkey == key.split(":")[1:]: + unique_item = QTreeWidgetItem() + line = [] for var in key.split(":"): line.append(var) for i in range(len(line)): unique_item.setText(i, line[i]) - # unique_item.setBackgroundColor unique_item.setBackground(i, QBrush(Qt.white)) self.unique_box.unique_info_tree.addTopLevelItem(unique_item) - return def fill_unique(self): """ @@ -1362,7 +1361,7 @@ class MainWindow(QWidget): if c: for i in range(len(line)): unique_item.setText(i, line[i]) - unique_item.setBackgroundColor(i, Qt.cyan) + unique_item.setBackground(i, QBrush(Qt.cyan)) else: for i in range(len(line)): unique_item.setText(i, line[i]) -- GitLab