summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-08-12 23:28:01 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2010-08-12 23:28:01 +0200
commit07e3ce3418d1f5f9c611c20a3ea57da076ec8409 (patch)
treed7fb91ed3ca2de101d47c3eba95620d305b3bd80
parentMerge commit 'refs/merge-requests/165' of git://gitorious.org/rekonq/mainline (diff)
downloadrekonq-07e3ce3418d1f5f9c611c20a3ea57da076ec8409.tar.xz
Fix the BK panel's drag and drop
-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();