X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fabstractbuffercontainer.cpp;h=b002d499b218465f6a2d7be5ed39e37bd8e5bf35;hb=3202bf5340396b5c6b467e8d92d808b1cbbbf7fb;hp=65377fe3926f823a9b0a08a8d67269bde6f866f3;hpb=9da8a8a14a39bffe74403001978a13cc8b130138;p=quassel.git diff --git a/src/uisupport/abstractbuffercontainer.cpp b/src/uisupport/abstractbuffercontainer.cpp index 65377fe3..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);