- return;
- }
-
- if(model()) {
- disconnect(this, 0, model(), 0);
- disconnect(model(), 0, this, 0);
- }
-
- if(!model_) {
- setModel(model_);
- } else {
- BufferViewFilter *filter = new BufferViewFilter(model_, config);
- setModel(filter);
- connect(filter, SIGNAL(configChanged()), this, SLOT(on_configChanged()));
- }
- setConfig(config);
-}
-
-void BufferView::setSelectionModel(QItemSelectionModel *selectionModel) {
- if(QTreeView::selectionModel())
- disconnect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
- model(), SIGNAL(checkPreviousCurrentForRemoval(QModelIndex, QModelIndex)));
-
- QTreeView::setSelectionModel(selectionModel);
- BufferViewFilter *filter = qobject_cast<BufferViewFilter *>(model());
- if(filter) {
- connect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
+}
+
+
+void BufferView::setSelectionModel(QItemSelectionModel *selectionModel)
+{
+ if (QTreeView::selectionModel())
+ disconnect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
+ model(), SIGNAL(checkPreviousCurrentForRemoval(QModelIndex, QModelIndex)));
+
+ QTreeView::setSelectionModel(selectionModel);
+ BufferViewFilter *filter = qobject_cast<BufferViewFilter *>(model());
+ if (filter) {
+ connect(selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),