mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-15 18:02:58 +08:00
chore: 在新窗口中打开时标题跟随之前的
This commit is contained in:
@@ -253,12 +253,14 @@ class TerminalTabbed(
|
|||||||
openInNewWindow.addActionListener {
|
openInNewWindow.addActionListener {
|
||||||
val index = tabbedPane.selectedIndex
|
val index = tabbedPane.selectedIndex
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
|
val title = tabbedPane.getTitleAt(index)
|
||||||
removeTabAt(index, false)
|
removeTabAt(index, false)
|
||||||
val dialog = TerminalTabDialog(
|
val dialog = TerminalTabDialog(
|
||||||
owner = SwingUtilities.getWindowAncestor(this),
|
owner = SwingUtilities.getWindowAncestor(this),
|
||||||
terminalTab = tab,
|
terminalTab = tab,
|
||||||
size = Dimension(min(size.width, 1280), min(size.height, 800))
|
size = Dimension(min(size.width, 1280), min(size.height, 800))
|
||||||
)
|
)
|
||||||
|
dialog.title = title
|
||||||
Disposer.register(dialog, tab)
|
Disposer.register(dialog, tab)
|
||||||
Disposer.register(this, dialog)
|
Disposer.register(this, dialog)
|
||||||
dialog.isVisible = true
|
dialog.isVisible = true
|
||||||
|
|||||||
Reference in New Issue
Block a user