Skip to content

Commit

Permalink
fix: tab drag out only disconnect the window siganl.
Browse files Browse the repository at this point in the history
Change-Id: Id2e045f6f39011c5e34c325ebaa5bddf78e12e09
  • Loading branch information
rekols committed Oct 8, 2018
1 parent 08c5b92 commit da27ede
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ void Window::addTabWithWrapper(EditWrapper *wrapper, const QString &filepath, co
}

// wrapper may be from anther window pointer.
wrapper->textEditor()->disconnect();

// reconnect signal.
connect(wrapper->textEditor(), &DTextEdit::clickFindAction, this, &Window::popupFindBar, Qt::QueuedConnection);
connect(wrapper->textEditor(), &DTextEdit::clickReplaceAction, this, &Window::popupReplaceBar, Qt::QueuedConnection);
Expand Down Expand Up @@ -417,6 +415,9 @@ void Window::removeWrapper(const QString &filePath, bool isDelete)
if (isDelete) {
wrapper->deleteLater();
}

// remove all signals on this connection.
disconnect(wrapper->textEditor(), 0, this, 0);
}

// Exit window after close all tabs.
Expand Down

0 comments on commit da27ede

Please sign in to comment.