X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=2ff57017dd057e9e3ba8ceebb5ed3a222423bfdf;hb=f1227a0a94322ff69ce0f254d980834672bab45a;hp=9030bfdd5b9924e8575eaf448dbc7776afb8a7e9;hpb=df242e4073c38c18389627041341062325c76b70;p=quassel.git diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 9030bfdd..2ff57017 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -747,7 +747,15 @@ void MainWin::setConnectedState() { void MainWin::loadLayout() { QtUiSettings s; int accountId = Client::currentCoreAccount().toInt(); - restoreState(s.value(QString("MainWinState-%1").arg(accountId)).toByteArray(), accountId); + QByteArray state = s.value(QString("MainWinState-%1").arg(accountId)).toByteArray(); + if(state.isEmpty()) { + // Make sure that the default bufferview is shown + if(_bufferViews.count()) + _bufferViews.at(0)->show(); + return; + } + + restoreState(state, accountId); _layoutLoaded = true; }