Commit 686a14da authored by Mariusz Glebocki's avatar Mariusz Glebocki
Browse files

Reconnect SessionController dropped from another window

parent 8df48a8f
......@@ -265,9 +265,14 @@ void TabbedViewContainer::moveActiveView(MoveDirection direction)
}
void TabbedViewContainer::terminalDisplayDropped(TerminalDisplay *terminalDisplay) {
Session* terminalSession = terminalDisplay->sessionController()->session();
terminalDisplay->sessionController()->deleteLater();
connectedViewManager()->attachView(terminalDisplay, terminalSession);
if (terminalDisplay->sessionController()->parent() != connectedViewManager()) {
// Terminal from another window - recreate SessionController for current ViewManager
disconnectTerminalDisplay(terminalDisplay);
Session* terminalSession = terminalDisplay->sessionController()->session();
terminalDisplay->sessionController()->deleteLater();
connectedViewManager()->attachView(terminalDisplay, terminalSession);
connectTerminalDisplay(terminalDisplay);
}
}
QSize TabbedViewContainer::sizeHint() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment