diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-12 23:28:01 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-12 23:28:01 +0200 |
commit | 07e3ce3418d1f5f9c611c20a3ea57da076ec8409 (patch) | |
tree | d7fb91ed3ca2de101d47c3eba95620d305b3bd80 /src/bookmarks/bookmarkstreemodel.cpp | |
parent | Merge commit 'refs/merge-requests/165' of git://gitorious.org/rekonq/mainline (diff) | |
download | rekonq-07e3ce3418d1f5f9c611c20a3ea57da076ec8409.tar.xz |
Fix the BK panel's drag and drop
Diffstat (limited to 'src/bookmarks/bookmarkstreemodel.cpp')
-rw-r--r-- | src/bookmarks/bookmarkstreemodel.cpp | 12 |
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(); |