Simplification using list comprehension

svn: r13826
This commit is contained in:
Gerald Britton 2009-12-16 17:51:53 +00:00
parent 0caa05e44f
commit 85c307d174

View File

@ -230,9 +230,10 @@ class BaseSelector(ManagedWindow.ManagedWindow):
""" """
Builds the default filters and add them to the filter bar. Builds the default filters and add them to the filter bar.
""" """
cols = [] cols = [(pair[3], pair[1])
for pair in [pair for pair in self.column_order() if pair[0]]: for pair in self.column_order()
cols.append((pair[3], pair[1])) if pair[0]
]
self.search_bar.setup_filter(cols) self.search_bar.setup_filter(cols)
def build_tree(self): def build_tree(self):