const QString nameFilter = controller->nameFilter();
if (!nameFilter.isEmpty()) {
- m_proxyModel->setFilterRegExp(nameFilter);
+ m_proxyModel->setFilterFixedString(nameFilter);
}
updateDecorationSize(dolphinView->showPreview());
return item;
}
+void DolphinColumnView::setSelectionModel(QItemSelectionModel* model)
+{
+ // If a change of the selection is done although the view is not active
+ // (e. g. by the selection markers), the column must be activated. This
+ // is done by listening to the current selectionChanged() signal.
+ if (selectionModel() != 0) {
+ disconnect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
+ this, SLOT(requestActivation()));
+ }
+
+ QListView::setSelectionModel(model);
+
+ connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
+ this, SLOT(requestActivation()));
+}
+
QStyleOptionViewItem DolphinColumnView::viewOptions() const
{
QStyleOptionViewItem viewOptions = QListView::viewOptions();
void DolphinColumnView::wheelEvent(QWheelEvent* event)
{
- const int height = m_decorationSize.height();
- const int step = (height >= KIconLoader::SizeHuge) ? height / 10 : (KIconLoader::SizeHuge - height) / 2;
+ const int step = m_decorationSize.height();
verticalScrollBar()->setSingleStep(step);
-
QListView::wheelEvent(event);
}
m_container->m_controller->emitViewportEntered();
}
-void DolphinColumnView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected)
-{
- QListView::selectionChanged(selected, deselected);
-
- //QItemSelectionModel* selModel = m_container->selectionModel();
- //selModel->select(selected, QItemSelectionModel::Select);
- //selModel->select(deselected, QItemSelectionModel::Deselect);
-}
-
void DolphinColumnView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
{
QListView::currentChanged(current, previous);