From 270864a9f0502f5c1538d211eaa22b2141493ade Mon Sep 17 00:00:00 2001 From: Janne Koschinski Date: Tue, 15 Jan 2019 17:23:14 +0100 Subject: [PATCH] Fixes bug where nicklist was broken on first start Starting with commit 66e6d26 the nicklist gets hidden in setDisconnectedState, but only unhidden in loadLayout. As loadLayout skips the setVisible(true) if the state is empty, the actual widget gets never shown, and the nicklist dock remains empty. This was fixed by moving the setVisible call above the conditional return. --- src/qtui/mainwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 640f42e7..1879aed7 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -1302,13 +1302,13 @@ void MainWin::loadLayout() QtUiSettings s; int accountId = Client::currentCoreAccount().accountId().toInt(); QByteArray state = s.value(QString("MainWinState-%1").arg(accountId)).toByteArray(); + _nickListWidget->setVisible(true); if (state.isEmpty()) { foreach(BufferViewDock *view, _bufferViews) view->show(); _layoutLoaded = true; return; } - _nickListWidget->setVisible(true); restoreState(state, accountId); int bufferViewId = s.value(QString("ActiveBufferView-%1").arg(accountId), -1).toInt(); if (bufferViewId >= 0) -- 2.20.1