summaryrefslogtreecommitdiff
path: root/src/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/bookmarkstreemodel.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp
index 7063bf9b..299efaf0 100644
--- a/src/bookmarks/bookmarkstreemodel.cpp
+++ b/src/bookmarks/bookmarkstreemodel.cpp
@@ -406,15 +406,15 @@ bool BookmarksTreeModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
if (parent.isValid())
root = bookmarkForIndex(parent).toGroup();
- if (!destIndex.isValid())
+ if (destIndex.isValid() && row != -1)
{
- root.deleteBookmark(bookmark);
- root.addBookmark(bookmark);
- }
+ root.moveBookmark(bookmark, root.previous(dropDestBookmark));
- else if (row != 1)
+ }
+ else
{
- root.moveBookmark(bookmark, root.previous(dropDestBookmark));
+ root.deleteBookmark(bookmark);
+ root.addBookmark(bookmark);
}
Application::bookmarkProvider()->bookmarkManager()->emitChanged();