m_active(true),
m_view(columnView),
m_selectionManager(0),
+ m_autoScroller(0),
m_url(url),
m_childUrl(),
m_font(),
setVerticalScrollMode(QListView::ScrollPerPixel);
setHorizontalScrollMode(QListView::ScrollPerPixel);
-
- new DolphinViewAutoScroller(this);
+
+ m_autoScroller = new DolphinViewAutoScroller(this);
// apply the column mode settings to the widget
const ColumnModeSettings* settings = DolphinSettings::instance().columnModeSettings();
connect(KGlobalSettings::self(), SIGNAL(kdisplayFontChanged()),
this, SLOT(updateFont()));
-
+
FolderExpander* folderExpander = new FolderExpander(this, m_proxyModel);
folderExpander->setEnabled(DolphinSettings::instance().generalSettings()->autoExpandFolders());
connect (folderExpander, SIGNAL(enterDir(const QModelIndex&)),
event->ignore();
return;
}
-
+
const int height = m_decorationSize.height();
const int step = (height >= KIconLoader::SizeHuge) ? height / 10 : (KIconLoader::SizeHuge - height) / 2;
verticalScrollBar()->setSingleStep(step);
selModel->select(deselected, QItemSelectionModel::Deselect);
}
+void DolphinColumnWidget::currentChanged(const QModelIndex& current, const QModelIndex& previous)
+{
+ QListView::currentChanged(current, previous);
+ if (current.isValid() && !m_autoScroller->isActive()) {
+ scrollTo(current);
+ }
+}
+
void DolphinColumnWidget::slotEntered(const QModelIndex& index)
{
m_view->m_controller->setItemView(this);