┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-05-06 22:25:15 +0000
committerPeter Penz <[email protected]>2008-05-06 22:25:15 +0000
commit90e8b435e7ce00175beceabb881dccb8a5088627 (patch)
treef7cccf932ef053605258791a5f4b0ff8b05c0853
parentc5727efd24a209d72515fb518adb7c35a4202141 (diff)
Fixed issue that the vertical scrollbar jumps back to the initial state during previews are loaded in the icons view.
BUG: 161086 BUG: 160513 svn path=/trunk/KDE/kdebase/apps/; revision=804790
-rw-r--r--src/dolphiniconsview.cpp10
-rw-r--r--src/dolphiniconsview.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index 2e6d7dca6..f763c5476 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -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);
diff --git a/src/dolphiniconsview.h b/src/dolphiniconsview.h
index 7ada661a4..a05d7ae27 100644
--- a/src/dolphiniconsview.h
+++ b/src/dolphiniconsview.h
@@ -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);