Skip to content

Commit 298320d

Browse files
authored
Merge pull request #11 from bitkid/sascha/buggy-ui
fix column type and update README.md
2 parents fab2b57 + e80e52c commit 298320d

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ The latest release can always be found here https://github.com/bitkid/itsf-ranki
1111
### Features
1212

1313
- downloads the ranking for the chosen tour from the ITSF page (top 2000 player in every category)
14-
- you can look at the rankings and copy them in an excel friendly way
14+
- you can look at the rankings and copy them in an Excel friendly way
1515
- you can search by ITSF license number
1616
- you can search for player names (phonetic, string part matching)
1717
- you can upload text files (for singles 1 player per line for doubles 2 players per line separated by `;`) and the app tries to match it with the current ranking
18+
- you can search for missing players or players with multiple matches and complete the list by providing points manually
19+
- columns can be sorted by clicking on them, which gives you a seeding
1820

1921
### Support
2022

21-
There is no support whatsoever. You can write issues and if i have time i might fix them. But i always accept PRs!
23+
There is no support whatsoever. You can write issues and if I have time I might fix them. But I always accept PRs!
2224

2325
### Development
2426

src/main/kotlin/com/bitkid/itsfranking/ui/ResultTableModel.kt

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ open class ResultTableModel(columns: List<String>, private val editable: Boolean
99
}
1010

1111
override fun getColumnClass(c: Int): Class<*> {
12-
val javaClass = getValueAt(0, c).javaClass
13-
return javaClass
12+
// try to find a value for the given column
13+
0.until(rowCount).forEach {
14+
val javaClass = getValueAt(it, c)?.javaClass
15+
if (javaClass != null)
16+
return javaClass
17+
}
18+
// nothing found so just return string
19+
return String::class.java
1420
}
1521
}
1622

0 commit comments

Comments
 (0)