X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=590126b94a04dbfb78eaede25d2f1dbdff53c6ff;hb=c6a9c963d53a171394b5c25d9925661e2788cec3;hp=2343b8a30e0b6a5eda9d28128be01424fd8aaa91;hpb=ee7d56f3abdb6ee4ce6c79ddea0142407b4e9e74;p=quassel.git diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 2343b8a3..590126b9 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -326,6 +326,7 @@ void MainWin::addBufferView(ClientBufferViewConfig *config) { if(!config) return; + config->setLocked(QtUiSettings().value("LockLayout", false).toBool()); BufferViewDock *dock = new BufferViewDock(config, this); //create the view and initialize it's filter @@ -388,8 +389,10 @@ void MainWin::on_actionLockLayout_toggled(bool lock) { foreach(VerticalDock *dock, docks) { dock->showTitle(!lock); } - foreach(ClientBufferViewConfig *config, Client::bufferViewManager()->clientBufferViewConfigs()) { - config->setLocked(lock); + if(Client::bufferViewManager()) { + foreach(ClientBufferViewConfig *config, Client::bufferViewManager()->clientBufferViewConfigs()) { + config->setLocked(lock); + } } QtUiSettings().setValue("LockLayout", lock); }