From 0984b8b8e1b6aec107b751f11206270aa99fb3c3 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 24 Aug 2009 08:20:09 +0000 Subject: [PATCH] - Cannot drop a feed into "Unread" item --- src/feedList.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/feedList.h b/src/feedList.h index dde18db35..c367cea4f 100644 --- a/src/feedList.h +++ b/src/feedList.h @@ -34,7 +34,7 @@ public: unread_item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/oxygen/mail-folder-inbox.png"))); itemAdded(unread_item, rssmanager); setCurrentItem(unread_item); - } + } void itemAdded(QTreeWidgetItem *item, RssFile* file) { mapping[item] = file; @@ -151,13 +151,17 @@ protected slots: protected: void dragMoveEvent(QDragMoveEvent * event) { QTreeWidgetItem *item = itemAt(event->pos()); - if(item && getItemType(item) != RssFile::FOLDER) + if(item == unread_item) { event->ignore(); - else { - if(selectedItems().contains(unread_item)) { + } else { + if(item && getItemType(item) != RssFile::FOLDER) event->ignore(); - } else { - QTreeWidget::dragMoveEvent(event); + else { + if(selectedItems().contains(unread_item)) { + event->ignore(); + } else { + QTreeWidget::dragMoveEvent(event); + } } } }