From df242e4073c38c18389627041341062325c76b70 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Wed, 18 Nov 2009 22:06:24 +0100 Subject: [PATCH] Make sure to properly remove bufferViews from the overlay --- src/qtui/mainwin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 1191d88f..9030bfdd 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -469,6 +469,7 @@ void MainWin::removeBufferView(int bufferViewConfigId) { if(dock && actionData.toInt() == bufferViewConfigId) { removeAction(action); _bufferViews.removeAll(dock); + Client::bufferViewOverlay()->removeView(dock->bufferViewId()); dock->deleteLater(); } } @@ -479,6 +480,11 @@ void MainWin::bufferViewToggled(bool enabled) { Q_ASSERT(action); BufferViewDock *dock = qobject_cast(action->parent()); Q_ASSERT(dock); + + // Make sure we don't toggle backlog fetch for a view we've already removed + if(!_bufferViews.contains(dock)) + return; + if(enabled) { Client::bufferViewOverlay()->addView(dock->bufferViewId()); BufferViewConfig *config = dock->config(); @@ -776,6 +782,7 @@ void MainWin::disconnectedFromCore() { if(dock && actionData.toInt() != -1) { removeAction(action); _bufferViews.removeAll(dock); + Client::bufferViewOverlay()->removeView(dock->bufferViewId()); dock->deleteLater(); } } -- 2.20.1