From: Peter Penz Date: Mon, 5 Jan 2009 18:21:34 +0000 (+0000) Subject: QAbstractItemView::scrollTo() may get called by QListView::keyPressEvent(), so m_enab... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/b2db9bd9eddcfaa01cdc2239bb73fa7f74767d56?ds=sidebyside QAbstractItemView::scrollTo() may get called by QListView::keyPressEvent(), so m_enableScrollTo (which is checked in DolphinIconsView::scrollTo()) must be enabled before. This fixes the issue that the autoscrolling does not work if exactly one item is selected and an invisible item should get focused because of a key press. BUG: 179049 svn path=/trunk/KDE/kdebase/apps/; revision=906179 --- diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 4b886f222..f32ecbd3d 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -261,9 +261,9 @@ void DolphinIconsView::dropEvent(QDropEvent* event) void DolphinIconsView::keyPressEvent(QKeyEvent* event) { + m_enableScrollTo = true; // see DolphinIconsView::scrollTo() KCategorizedView::keyPressEvent(event); m_controller->handleKeyPressEvent(event); - m_enableScrollTo = true; // see DolphinIconsView::scrollTo() } void DolphinIconsView::wheelEvent(QWheelEvent* event)