Browse Source

- Cannot drop a feed into "Unread" item

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
0984b8b8e1
  1. 16
      src/feedList.h

16
src/feedList.h

@ -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);
}
} }
} }
} }

Loading…
Cancel
Save