X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fabstractbuffercontainer.cpp;h=b002d499b218465f6a2d7be5ed39e37bd8e5bf35;hb=61c8d84d1c849373e0f115dc748ed45cff95287d;hp=4691c9442abdbf65f30bcae615c3961ab02bd1de;hpb=1477d071abda9697c26ba1c0bbf4c2676faa05a5;p=quassel.git diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index 4691c944..b002d499 100644 --- a/src/uisupport/abstractbuffercontainer.cpp +++ b/src/uisupport/abstractbuffercontainer.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2010 by the Quassel Project * + * Copyright (C) 2005-2012 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -66,6 +66,9 @@ void AbstractBufferContainer::removeBuffer(BufferId bufferId) { _chatViews.take(bufferId); } +/* + Switching to first buffer is now handled in MainWin::clientNetworkUpdated() + void AbstractBufferContainer::rowsInserted(const QModelIndex &parent, int start, int end) { Q_UNUSED(end) @@ -80,12 +83,14 @@ void AbstractBufferContainer::rowsInserted(const QModelIndex &parent, int start, setCurrentBuffer(id); } } +*/ void AbstractBufferContainer::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) { Q_UNUSED(previous) BufferId newBufferId = current.data(NetworkModel::BufferIdRole).value(); - if(newBufferId.isValid() && currentBuffer() != newBufferId) { + // To be able to reset the selected buffer, we don't check if buffer/index is valid here + if(currentBuffer() != newBufferId) { setCurrentBuffer(newBufferId); emit currentChanged(newBufferId); emit currentChanged(current); @@ -97,8 +102,6 @@ void AbstractBufferContainer::setCurrentBuffer(BufferId bufferId) { if(prevBufferId.isValid() && _chatViews.contains(prevBufferId)) { MsgId msgId = _chatViews.value(prevBufferId)->lastMsgId(); Client::setBufferLastSeenMsg(prevBufferId, msgId); - if(autoSetMarkerLine()) - Client::setBufferMarkerLine(prevBufferId, msgId); } if(!bufferId.isValid()) {