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();
void DolphinColumnWidget::setActive(bool active)
{
- if (m_active == active) {
- return;
+ if (active && (m_view->focusProxy() != this)) {
+ m_view->setFocusProxy(this);
}
- m_active = active;
+ if (m_active != active) {
+ m_active = active;
- if (active) {
- activate();
- } else {
- deactivate();
+ if (active) {
+ activate();
+ } else {
+ deactivate();
+ }
}
}
void DolphinColumnWidget::currentChanged(const QModelIndex& current, const QModelIndex& previous)
{
QListView::currentChanged(current, previous);
- if (current.isValid()) {
+ if (current.isValid() && !m_autoScroller->isActive()) {
scrollTo(current);
}
}