diff options
| author | Peter Penz <[email protected]> | 2008-12-13 14:08:07 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-12-13 14:08:07 +0000 |
| commit | 99271699f305de4ad25a8c2a6dd7e7307cb61af7 (patch) | |
| tree | 8410decfe5f1aff0af84d4e127c1b3bd06235848 /src/dolphinviewautoscroller.cpp | |
| parent | a86985b0b46ee97e7705242f3d5648f84425a87b (diff) | |
Handling the key events for autoscrolling in DolphinViewAutoscroller does not work good enough (e. g. when letters are pressed, the current index might change too). Revert to Frank Reininhaus' original patch to fix this issue :-)
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=896362
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) && |
