Identifier lists are now sorted, and there is no active list when a row is selected.
This commit is contained in:
parent
a670fc6b61
commit
0d8edc91ca
|
@ -105,8 +105,8 @@ class SelectionTree(gtk.TreeView):
|
||||||
i = self.store.insert_after(d, None, (selection.title, selection))
|
i = self.store.insert_after(d, None, (selection.title, selection))
|
||||||
|
|
||||||
def _update_current_dim(self):
|
def _update_current_dim(self):
|
||||||
if not self._current_dim or not self._current_selection:
|
id_list = []
|
||||||
return
|
if self._current_dim and self._current_selection:
|
||||||
id_list = self._current_selection[self._current_dim]
|
id_list = self._current_selection[self._current_dim]
|
||||||
self._identifier_list.set_identifiers(id_list)
|
self._identifier_list.set_identifiers(id_list)
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ class SelectionTree(gtk.TreeView):
|
||||||
i = self.store.get_iter(cursor)
|
i = self.store.get_iter(cursor)
|
||||||
p = self.store.iter_parent(i)
|
p = self.store.iter_parent(i)
|
||||||
if p == None:
|
if p == None:
|
||||||
self._current_selection = None
|
self._current_dim = None
|
||||||
else:
|
else:
|
||||||
self._current_dim = self.store.get_value(p, 0)
|
self._current_dim = self.store.get_value(p, 0)
|
||||||
self._current_selection = self.store.get_value(i, 1)
|
self._current_selection = self.store.get_value(i, 1)
|
||||||
|
@ -154,6 +154,8 @@ class IdentifierList(gtk.TreeView):
|
||||||
def set_identifiers(self, identifiers):
|
def set_identifiers(self, identifiers):
|
||||||
"Show the list of identifier strings."
|
"Show the list of identifier strings."
|
||||||
self.store.clear()
|
self.store.clear()
|
||||||
for e in identifiers:
|
id_list = list(identifiers)
|
||||||
|
id_list.sort()
|
||||||
|
for e in id_list:
|
||||||
self.store.append((e,))
|
self.store.append((e,))
|
||||||
|
|
||||||
|
|
Reference in New Issue