mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 13:50:12 +08:00
Fix: create tab repeatedly
This commit is contained in:
parent
eafc281bc2
commit
48405c678d
@ -32,12 +32,14 @@ class PrimaryView : View() {
|
||||
|
||||
setCellFactory {
|
||||
object : JFXListCell<BotModel>() {
|
||||
var tab: Tab? = null
|
||||
|
||||
init {
|
||||
onDoubleClick {
|
||||
(center as TabPane).logTab(
|
||||
tab?.select() ?: (center as TabPane).logTab(
|
||||
text = item.uin.toString(),
|
||||
logs = item.logHistory
|
||||
).select()
|
||||
).select().also { tab = it }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user