X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=9c58f75f20d93b0e2164ab31d0ab7d4afd5b92ff;hb=02b4f33429788d35500454bfb5a8a9ab0a2a2b49;hp=e1d961cd3f72cfd9a97bb1acb07397d96a9cd25e;hpb=925149e4675223754de4962b95728b76647d4949;p=quassel.git diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index e1d961cd..9c58f75f 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -491,6 +491,11 @@ void MainWin::removeBufferView(int bufferViewConfigId) { } void MainWin::bufferViewToggled(bool enabled) { + if(!enabled && !isVisible()) { + // hiding the mainwindow triggers a toggle of the bufferview (which pretty much sucks big time) + // since this isn't our fault and we can't do anything about it, we suppress the resulting calls + return; + } QAction *action = qobject_cast(sender()); Q_ASSERT(action); BufferViewDock *dock = qobject_cast(action->parent()); @@ -502,23 +507,6 @@ void MainWin::bufferViewToggled(bool enabled) { if(enabled) { Client::bufferViewOverlay()->addView(dock->bufferViewId()); - BufferViewConfig *config = dock->config(); - if(config && config->isInitialized()) { - BufferIdList buffers; - if(config->networkId().isValid()) { - foreach(BufferId bufferId, config->bufferList()) { - if(Client::networkModel()->networkId(bufferId) == config->networkId()) - buffers << bufferId; - } - foreach(BufferId bufferId, config->temporarilyRemovedBuffers().toList()) { - if(Client::networkModel()->networkId(bufferId) == config->networkId()) - buffers << bufferId; - } - } else { - buffers = BufferIdList::fromSet(config->bufferList().toSet() + config->temporarilyRemovedBuffers()); - } - Client::backlogManager()->checkForBacklog(buffers); - } } else { Client::bufferViewOverlay()->removeView(dock->bufferViewId()); } @@ -801,7 +789,6 @@ void MainWin::disconnectedFromCore() { if(dock && actionData.toInt() != -1) { removeAction(action); _bufferViews.removeAll(dock); - Client::bufferViewOverlay()->removeView(dock->bufferViewId()); dock->deleteLater(); } }