- Fix "add new Feed" when no item is selected (or Unread item is selected)

This commit is contained in:
Christophe Dumez 2009-08-24 08:03:28 +00:00
parent ca00f3084d
commit 68d8a9ed47

View file

@ -168,7 +168,11 @@ void RSSImp::on_newFeedButton_clicked() {
} }
RssStream *stream = rss_parent->addStream(newUrl); RssStream *stream = rss_parent->addStream(newUrl);
// Create TreeWidget item // Create TreeWidget item
QTreeWidgetItem* item = new QTreeWidgetItem(parent_item); QTreeWidgetItem* item;
if(parent_item)
item = new QTreeWidgetItem(parent_item);
else
item = new QTreeWidgetItem(listStreams);
// Notify TreeWidget // Notify TreeWidget
listStreams->itemAdded(item, stream); listStreams->itemAdded(item, stream);
// Set text // Set text