1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-04 17:30:55 +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:
Peter Penz 2007-02-17 07:16:59 +00:00
parent 73a9e20701
commit 86110e2778
2 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -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);