]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphindetailsview.cpp
Fixed issue that the scroll position is reset if the focus of the itemview changes.
[dolphin.git] / src / dolphindetailsview.cpp
index ad362914aec896948bdd6e2bf00a2aeb9a1600ce..aa65ff6bc7fc22e19c072fa07dfbf6d549712be0 100644 (file)
@@ -429,9 +429,7 @@ void DolphinDetailsView::wheelEvent(QWheelEvent* event)
 void DolphinDetailsView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
 {
     QTreeView::currentChanged(current, previous);
-    if (current.isValid() && !m_autoScroller->isActive()) {
-        scrollTo(current);
-    }
+    m_autoScroller->handleCurrentIndexChange(current, previous);
 
     // Stay consistent with QListView: When changing the current index by key presses,
     // also change the selection.