]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/klistview.cpp
Allow to sort by rating, which can be quite useful in combination with the "Show...
[dolphin.git] / src / klistview.cpp
index 15c8b576ad73b99f7e17d3184a6d68791a02d479..0c65b9141f4409f471dcfa89f9f8ba9687d6b36c 100644 (file)
@@ -386,6 +386,9 @@ void KListView::Private::updateScrollbars()
 {
     int lastItemBottom = cachedRectIndex(lastIndex).bottom() +
                            listView->spacing() - listView->viewport()->height();
+
+    listView->verticalScrollBar()->setSingleStep(listView->viewport()->height() / 10);
+    listView->verticalScrollBar()->setPageStep(listView->viewport()->height());
     listView->verticalScrollBar()->setRange(0, lastItemBottom);
 }
 
@@ -483,6 +486,10 @@ void KListView::setItemCategorizer(KItemCategorizer *itemCategorizer)
     {
         rowsInserted(QModelIndex(), 0, d->proxyModel->rowCount() - 1);
     }
+    else
+    {
+        updateGeometries();
+    }
 }
 
 QModelIndex KListView::indexAt(const QPoint &point) const
@@ -811,6 +818,13 @@ void KListView::leaveEvent(QEvent *event)
     viewport()->update();
 }
 
+void KListView::startDrag(Qt::DropActions supportedActions)
+{
+    d->mouseButtonPressed = false;
+
+    QListView::startDrag(supportedActions);
+}
+
 void KListView::rowsInserted(const QModelIndex &parent,
                              int start,
                              int end)
@@ -956,7 +970,7 @@ void KListView::updateGeometries()
 
 void KListView::slotSortingRoleChanged()
 {
-    if ((viewMode() != KListView::ListMode) && d->proxyModel &&
+    if ((viewMode() == KListView::IconMode) && d->proxyModel &&
         d->itemCategorizer)
     {
         // Force the view to update all elements