┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/panels/places/placesitemmodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp
index 7513a25d5..e8636942b 100644
--- a/src/panels/places/placesitemmodel.cpp
+++ b/src/panels/places/placesitemmodel.cpp
@@ -353,7 +353,10 @@ void PlacesItemModel::dropMimeDataBefore(int index, const QMimeData* mimeData)
int oldIndex;
stream >> oldIndex;
- m_sourceModel->movePlace(oldIndex, index);
+ QModelIndex sourceIndex = mapToSource(index);
+ QModelIndex oldSourceIndex = mapToSource(oldIndex);
+
+ m_sourceModel->movePlace(oldSourceIndex.row(), sourceIndex.row());
} else if (mimeData->hasFormat(QStringLiteral("text/uri-list"))) {
// One or more items must be added to the model
const QList<QUrl> urls = KUrlMimeData::urlsFromMimeData(mimeData);