From 7fbc814147ed8d1e5f0b1677fc8808c3c2b6c22c Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 13 Dec 2008 15:39:09 +0000 Subject: only jump automatically to the current index, if the autoscrolling is not active svn path=/trunk/KDE/kdebase/apps/; revision=896481 --- src/dolphiniconsview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/dolphiniconsview.cpp') diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 2e43656ba..d30ef321e 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -43,6 +43,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle m_enableScrollTo(false), m_controller(controller), m_selectionManager(0), + m_autoScroller(0), m_categoryDrawer(0), m_font(), m_decorationSize(), @@ -62,7 +63,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle viewport()->setAcceptDrops(true); setMouseTracking(true); - new DolphinViewAutoScroller(this); + m_autoScroller = new DolphinViewAutoScroller(this); connect(this, SIGNAL(clicked(const QModelIndex&)), controller, SLOT(requestTab(const QModelIndex&))); @@ -317,7 +318,7 @@ void DolphinIconsView::leaveEvent(QEvent* event) void DolphinIconsView::currentChanged(const QModelIndex& current, const QModelIndex& previous) { KCategorizedView::currentChanged(current, previous); - if (current.isValid()) { + if (current.isValid() && !m_autoScroller->isActive()) { scrollTo(current); } } -- cgit v1.3