chore: 在新窗口中打开时标题跟随之前的

This commit is contained in:
hstyi
2025-01-09 15:46:49 +08:00
committed by hstyi
parent cfb841db00
commit 4a8faea8c5

View File

@@ -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