mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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
This commit is contained in:
parent
c5727efd24
commit
90e8b435e7
2 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue