projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ec17201
)
This should fix the bug, that buffer switches are propagated multiple times
author
Marcus Eggenberger
<egs@quassel-irc.org>
Wed, 28 Nov 2007 17:06:04 +0000
(17:06 +0000)
committer
Marcus Eggenberger
<egs@quassel-irc.org>
Wed, 28 Nov 2007 17:06:04 +0000
(17:06 +0000)
src/client/buffertreemodel.cpp
patch
|
blob
|
history
diff --git
a/src/client/buffertreemodel.cpp
b/src/client/buffertreemodel.cpp
index
1066c89
..
bc2bf0a
100644
(file)
--- 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)
// 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);
bufferActivity(Buffer::NoActivity, currentBuffer);
emit bufferSelected(currentBuffer);
emit selectionChanged(index);