diff options
Diffstat (limited to 'src/dolphinviewautoscroller.cpp')
| -rw-r--r-- | src/dolphinviewautoscroller.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/dolphinviewautoscroller.cpp b/src/dolphinviewautoscroller.cpp index b99bbc749..04a396b9a 100644 --- a/src/dolphinviewautoscroller.cpp +++ b/src/dolphinviewautoscroller.cpp @@ -36,7 +36,6 @@ DolphinViewAutoScroller::DolphinViewAutoScroller(QAbstractItemView* parent) : { m_itemView->setAutoScroll(false); m_itemView->viewport()->installEventFilter(this); - m_itemView->installEventFilter(this); m_timer = new QTimer(this); m_timer->setSingleShot(false); @@ -84,24 +83,8 @@ bool DolphinViewAutoScroller::eventFilter(QObject* watched, QEvent* event) default: break; } - } else if ((watched == m_itemView) && (event->type() == QEvent::KeyPress)) { - switch (static_cast<QKeyEvent*>(event)->key()) { - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_Left: - case Qt::Key_Right: - case Qt::Key_PageUp: - case Qt::Key_PageDown: - case Qt::Key_Home: - case Qt::Key_End: - QMetaObject::invokeMethod(this, "scrollToCurrentIndex", Qt::QueuedConnection); - break; - default: - break; - } } - return QObject::eventFilter(watched, event); } @@ -131,12 +114,6 @@ void DolphinViewAutoScroller::scrollViewport() } } -void DolphinViewAutoScroller::scrollToCurrentIndex() -{ - const QModelIndex index = m_itemView->currentIndex(); - m_itemView->scrollTo(index); -} - void DolphinViewAutoScroller::triggerAutoScroll() { const bool verticalScrolling = (m_itemView->verticalScrollBar() != 0) && |
