Commit dc353e8f authored by Ahmad Samir's avatar Ahmad Samir Committed by Tomaz Canabrava
Browse files

Minor cleanup

parent 33b3a1a7
......@@ -254,11 +254,12 @@ void TabbedViewContainer::moveActiveView(MoveDirection direction)
void TabbedViewContainer::terminalDisplayDropped(TerminalDisplay *terminalDisplay)
{
if (terminalDisplay->sessionController()->parent() != connectedViewManager()) {
auto *controller = terminalDisplay->sessionController();
if (controller->parent() != connectedViewManager()) {
// Terminal from another window - recreate SessionController for current ViewManager
disconnectTerminalDisplay(terminalDisplay);
Session *terminalSession = terminalDisplay->sessionController()->session();
Q_EMIT terminalDisplay->sessionController()->viewDragAndDropped(terminalDisplay->sessionController());
Session *terminalSession = controller->session();
Q_EMIT controller->viewDragAndDropped(controller);
connectedViewManager()->attachView(terminalDisplay, terminalSession);
connectTerminalDisplay(terminalDisplay);
}
......
Supports Markdown
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