diff options
| author | Nate Graham <[email protected]> | 2019-03-20 17:48:26 +0100 |
|---|---|---|
| committer | Nate Graham <[email protected]> | 2019-03-20 17:48:26 +0100 |
| commit | 1775002247ec20f8bacda97f93901ec56ef4f38e (patch) | |
| tree | 29345e8d2ef62d101b9d53f13b1440c2359410e0 | |
| parent | b2b1f76031f872b42ae060dbb7a2f98d9b90496c (diff) | |
| parent | 303cd17444e1fb88d1f92a911f7c770214b8f90e (diff) | |
Merge branch 'Applications/19.04'
| -rw-r--r-- | src/panels/places/placesitemmodel.cpp | 5 |
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); |
