SetSelectedRow and SetSelectedCol work on the trivial case

This commit is contained in:
Juan López Rubio 2020-12-26 01:57:54 +01:00 committed by GitHub
parent c2a27ec6f1
commit 374f08eeb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -978,6 +978,8 @@ func (l *TableView) SetSelectedRow(row int) {
l.selectedRow = l.rowCount - 1
} else if row < -1 {
l.selectedRow = -1
} else {
l.selectedRow = row
}
if l.selectedRow != oldSelection {
@ -996,6 +998,8 @@ func (l *TableView) SetSelectedCol(col int) {
l.selectedCol = len(l.columns) - 1
} else if col < -1 {
l.selectedCol = -1
} else {
l.selectedCol = col
}
if l.selectedCol != oldSelection {