]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Assure that the horizontal and vertical slider position don't reset if an item is...
authorPeter Penz <peter.penz19@gmail.com>
Sat, 17 Feb 2007 07:16:59 +0000 (07:16 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 17 Feb 2007 07:16:59 +0000 (07:16 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=634399

src/dolphinview.cpp
src/dolphinview.h

index abb0e9f86d554661592c95ff6397d9153a2c705a..58c33b250027e3c0e9ee46b24a252885a4de8a59 100644 (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)
index 7d6e1288fb498efa3170134a392630bec68c48a3..4bb254f42fd5515757af1ec1517a2282e5830b61 100644 (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);