X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbuffermodel.cpp;h=2fc222ed4a799c4d455353d20a2169a9a1f85264;hp=78d3960502fb6c5a33584b01e4390b356b4471a2;hb=770b7ef54b03f3ebd1e29a58b4757505e1809b2d;hpb=23eed68958b7585552be04fab4e5871a781b7f38 diff --git a/src/client/buffermodel.cpp b/src/client/buffermodel.cpp index 78d39605..2fc222ed 100644 --- a/src/client/buffermodel.cpp +++ b/src/client/buffermodel.cpp @@ -35,6 +35,8 @@ BufferModel::BufferModel(NetworkModel *parent) // initialize the Property Mapper _propertyMapper.setModel(this); _selectionModelSynchronizer.addRegularSelectionModel(_propertyMapper.selectionModel()); + connect(_propertyMapper.selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), + this, SLOT(currentChanged(QModelIndex, QModelIndex))); } BufferModel::~BufferModel() { @@ -68,3 +70,8 @@ void BufferModel::mapProperty(int column, int role, QObject *target, const QByte QModelIndex BufferModel::currentIndex() { return propertyMapper()->selectionModel()->currentIndex(); } + +void BufferModel::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) { + Q_UNUSED(current); + setData(previous, qVariantFromValue((int)BufferItem::NoActivity), NetworkModel::BufferActivityRole); +}