diff --git a/mseedpeek/mseedpeek.py b/mseedpeek/mseedpeek.py index 4824bc56fdf6da5e4c0f2e693dd7348557cdecea..126b6284884343409e4c712c7f2693c5505e29a3 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])