X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffertreemodel.cpp;fp=src%2Fclient%2Fbuffertreemodel.cpp;h=bc2bf0ad21c2bc1930093c4124a23ea2a9e21083;hp=1066c8947ecf866d8078603421139eeccf9ece70;hb=90c454909ca9b86d096c18a011f6c10465a672e2;hpb=ec17201104f75eafaddccc174de8709b42b15ccb diff --git a/src/client/buffertreemodel.cpp b/src/client/buffertreemodel.cpp index 1066c894..bc2bf0ad 100644 --- a/src/client/buffertreemodel.cpp +++ b/src/client/buffertreemodel.cpp @@ -313,8 +313,9 @@ void BufferTreeModel::bufferUpdated(Buffer *buffer) { // This Slot indicates that the user has selected a different buffer in the gui void BufferTreeModel::setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command) { Q_UNUSED(command) - if(isBufferIndex(index)) { - currentBuffer = getBufferByIndex(index); + Buffer *newCurrentBuffer; + if(isBufferIndex(index) && currentBuffer != (newCurrentBuffer = getBufferByIndex(index))) { + currentBuffer = newCurrentBuffer; bufferActivity(Buffer::NoActivity, currentBuffer); emit bufferSelected(currentBuffer); emit selectionChanged(index);