select first record only if nothing is selected

Otherwise the first record is always appended to the selection when a focus
event happens

review779003
This commit is contained in:
Cédric Krier committed 2013-04-14 00:26:55 +02:00
1 parent a50541d221
commit 0ffdb081ff
1 file changed
+1 -1
@@ -298,7 +298,7 @@ class ParserTree(ParserInterface):
def set_selection(self, treeview, direction):
selection = treeview.get_selection()
if len(treeview.get_model()):
if len(treeview.get_model()) and not selection.count_selected_rows():
selection.select_path(0)
return False