1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

- Cannot drop a feed into "Unread" item

This commit is contained in:
Christophe Dumez 2009-08-24 08:20:09 +00:00
parent 3dd7dcc58f
commit 0984b8b8e1

View File

@ -34,7 +34,7 @@ public:
unread_item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/oxygen/mail-folder-inbox.png"))); unread_item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/oxygen/mail-folder-inbox.png")));
itemAdded(unread_item, rssmanager); itemAdded(unread_item, rssmanager);
setCurrentItem(unread_item); setCurrentItem(unread_item);
} }
void itemAdded(QTreeWidgetItem *item, RssFile* file) { void itemAdded(QTreeWidgetItem *item, RssFile* file) {
mapping[item] = file; mapping[item] = file;
@ -151,13 +151,17 @@ protected slots:
protected: protected:
void dragMoveEvent(QDragMoveEvent * event) { void dragMoveEvent(QDragMoveEvent * event) {
QTreeWidgetItem *item = itemAt(event->pos()); QTreeWidgetItem *item = itemAt(event->pos());
if(item && getItemType(item) != RssFile::FOLDER) if(item == unread_item) {
event->ignore(); event->ignore();
else { } else {
if(selectedItems().contains(unread_item)) { if(item && getItemType(item) != RssFile::FOLDER)
event->ignore(); event->ignore();
} else { else {
QTreeWidget::dragMoveEvent(event); if(selectedItems().contains(unread_item)) {
event->ignore();
} else {
QTreeWidget::dragMoveEvent(event);
}
} }
} }
} }