mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: quick open transfer failure
This commit is contained in:
@@ -56,17 +56,24 @@ class TransferAnAction : AnAction(I18n.getString("termora.transport.sftp"), Icon
|
|||||||
}
|
}
|
||||||
|
|
||||||
val host = hostManager.getHost(hostId) ?: return
|
val host = hostManager.getHost(hostId) ?: return
|
||||||
|
var selectionPane: TransportSelectionPanel? = null
|
||||||
|
|
||||||
for (i in 0 until tabbed.tabCount) {
|
for (i in 0 until tabbed.tabCount) {
|
||||||
val c = tabbed.getComponentAt(i)
|
val c = tabbed.getComponentAt(i)
|
||||||
if (c is TransportSelectionPanel) {
|
if (c is TransportSelectionPanel) {
|
||||||
if (c.state == TransportSelectionPanel.State.Initialized) {
|
if (c.state == TransportSelectionPanel.State.Initialized) {
|
||||||
c.connect(host)
|
selectionPane = c
|
||||||
return
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tabbed.addSelectionTab()
|
if (selectionPane == null) {
|
||||||
|
selectionPane = tabbed.addSelectionTab()
|
||||||
|
}
|
||||||
|
|
||||||
|
selectionPane.connect(host)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user