Reenabled Activity levels
[quassel.git] / src / client / buffermodel.cpp
index 78d3960..2fc222e 100644 (file)
@@ -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 &current, const QModelIndex &previous) {
+  Q_UNUSED(current);
+  setData(previous, qVariantFromValue((int)BufferItem::NoActivity), NetworkModel::BufferActivityRole);
+}