mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-03 23:29:06 +00:00
Assure that the horizontal and vertical slider position don't reset if an item is deleted or added.
svn path=/trunk/KDE/kdebase/apps/; revision=634399
This commit is contained in:
parent
73a9e20701
commit
86110e2778
|
@ -909,6 +909,11 @@ void DolphinView::updateSortOrder(Qt::SortOrder order)
|
|||
emit sortOrderChanged(order);
|
||||
}
|
||||
|
||||
void DolphinView::emitContentsMoved()
|
||||
{
|
||||
emit contentsMoved(contentsX(), contentsY());
|
||||
}
|
||||
|
||||
void DolphinView::createView()
|
||||
{
|
||||
// delete current view
|
||||
|
@ -949,6 +954,10 @@ void DolphinView::createView()
|
|||
|
||||
connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
|
||||
m_controller, SLOT(indicateSelectionChange()));
|
||||
connect(view->verticalScrollBar(), SIGNAL(valueChanged(int)),
|
||||
this, SLOT(emitContentsMoved()));
|
||||
connect(view->horizontalScrollBar(), SIGNAL(valueChanged(int)),
|
||||
this, SLOT(emitContentsMoved()));
|
||||
}
|
||||
|
||||
void DolphinView::selectAll(QItemSelectionModel::SelectionFlags flags)
|
||||
|
|
|
@ -457,6 +457,12 @@ private slots:
|
|||
*/
|
||||
void updateSortOrder(Qt::SortOrder order);
|
||||
|
||||
/**
|
||||
* Emits the signal contentsMoved with the current coordinates
|
||||
* of the viewport as parameters.
|
||||
*/
|
||||
void emitContentsMoved();
|
||||
|
||||
private:
|
||||
void startDirLister(const KUrl& url, bool reload = false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue