comparison urwid_satext/sat_widgets.py @ 99:b2fee87c1d5a

Fixed focus when first row is not selectable in TableContainer
author Goffi <goffi@goffi.org>
date Mon, 08 Sep 2014 18:11:16 +0200
parents 8bf5a35450f0
children ed2675f92f7c
comparison
equal deleted inserted replaced
98:8bf5a35450f0 99:b2fee87c1d5a
1441 if self._row_selectable and col_idx == self._columns - 1: 1441 if self._row_selectable and col_idx == self._columns - 1:
1442 columns.addWidget(urwid.SelectableIcon(''), columns.options('given', 0)) 1442 columns.addWidget(urwid.SelectableIcon(''), columns.options('given', 0))
1443 1443
1444 if not columns.selectable() and columns.contents[-1][0].base_widget.selectable(): 1444 if not columns.selectable() and columns.contents[-1][0].base_widget.selectable():
1445 columns.focus_position = len(columns.contents)-1 1445 columns.focus_position = len(columns.contents)-1
1446 if not self.selectable() and columns.selectable():
1447 pile.focus_position = len(pile.contents) - 1
1446 self._idx += 1 1448 self._idx += 1
1447 1449
1448 def setRowIndex(self, idx): 1450 def setRowIndex(self, idx):
1449 self._next_row_idx = idx 1451 self._next_row_idx = idx
1450 1452