]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fixed issue that the vertical scrollbar jumps back to the initial state during previe...
authorPeter Penz <peter.penz19@gmail.com>
Tue, 6 May 2008 22:25:15 +0000 (22:25 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 6 May 2008 22:25:15 +0000 (22:25 +0000)
BUG: 161086
BUG: 160513

svn path=/trunk/KDE/kdebase/apps/; revision=804790

src/dolphiniconsview.cpp
src/dolphiniconsview.h

index 2e6d7dca6e072d3d3afe949ccd25273c73fef3cb..f763c5476bda7dd9a62da3269c14c9ae967b0735 100644 (file)
@@ -135,6 +135,16 @@ DolphinIconsView::~DolphinIconsView()
     m_categoryDrawer = 0;
 }
 
+void DolphinIconsView::scrollTo(const QModelIndex& index, ScrollHint hint)
+{
+    Q_UNUSED(index);
+    Q_UNUSED(hint);
+    // Disable the QListView implementation of scrollTo(), as QAbstractItemView
+    // wants to scroll to the current index each time the layout has been changed.
+    // This becomes an issue when previews are loaded and the scrollbar is used: the
+    // scrollbar will always be reset to 0 on each new preview.
+}
+
 void DolphinIconsView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight)
 {
     KCategorizedView::dataChanged(topLeft, bottomRight);
index 7ada661a4d8655ab1ce0fb0c94c27ec1b3335cec..a05d7ae277742e6d13c9bebca37c2a47d861fb1e 100644 (file)
@@ -48,6 +48,7 @@ class LIBDOLPHINPRIVATE_EXPORT DolphinIconsView : public KCategorizedView
 public:
     explicit DolphinIconsView(QWidget* parent, DolphinController* controller);
     virtual ~DolphinIconsView();
+    virtual void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible);
 
 protected slots:
     virtual void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);