Fix selection of column in next/previous
When _sign is negative, it doesn't select the first column but the second. So despite of selection the wrong column, it could crash if there is only one column in the view. review3241004 (transplanted from f05cc122d3fd52141386f8097d0fc3989b85abd4)
This commit is contained in:
1 parent
eb70c9fba5
commit
034beccaf2
1 file changed
+1
-1
@@ -21,7 +21,7 @@ class TreeView(gtk.TreeView):
|
||||
def next_column(self, path, column=None, _sign=1):
|
||||
columns = self.get_columns()
|
||||
if column is None:
|
||||
column = columns[-1 * _sign]
|
||||
column = columns[-1 if _sign > 0 else 0]
|
||||
model = self.get_model()
|
||||
record = model.get_value(model.get_iter(path), 0)
|
||||
if _sign < 0:
|
||||
|
||||
Reference in new issue
Block a user