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