-QModelIndex BufferModel::currentIndex() {
- return propertyMapper()->selectionModel()->currentIndex();
+void BufferModel::setCurrentIndex(const QModelIndex &newCurrent) {
+ _selectionModelSynchronizer.selectionModel()->setCurrentIndex(newCurrent, QItemSelectionModel::Current);
+ _selectionModelSynchronizer.selectionModel()->select(newCurrent, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
+}
+
+void BufferModel::debug_currentChanged(QModelIndex current, QModelIndex previous) {
+ Q_UNUSED(previous);
+ qDebug() << "Switched current Buffer: " << current << current.data().toString() << "Buffer:" << current.data(NetworkModel::BufferIdRole).value<BufferId>();