diff --git a/src/feedList.h b/src/feedList.h index a0cbb3ef2..bf3e1a708 100644 --- a/src/feedList.h +++ b/src/feedList.h @@ -32,8 +32,11 @@ public: void itemAdded(QTreeWidgetItem *item, RssFile* file) { mapping[item] = file; - if(file->getType() == RssFile::STREAM) + if(file->getType() == RssFile::STREAM) { feeds_items[file->getID()] = item; + if(topLevelItemCount() == 1) + setCurrentItem(item); + } } void itemRemoved(QTreeWidgetItem *item) { diff --git a/src/rss_imp.cpp b/src/rss_imp.cpp index ceecfa58c..75bd37b52 100644 --- a/src/rss_imp.cpp +++ b/src/rss_imp.cpp @@ -162,8 +162,6 @@ void RSSImp::on_newFeedButton_clicked() { // Set text item->setText(0, stream->getName() + QString::fromUtf8(" (0)")); item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); - if(listStreams->topLevelItemCount() == 1) - selectFirstFeed(); stream->refresh(); rssmanager->saveStreamList(); } @@ -471,8 +469,6 @@ RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){ connect(listNews, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(refreshTextBrowser(QListWidgetItem *))); connect(listNews, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(downloadTorrent())); - // Select first news of first feed - selectFirstFeed(); // Refresh all feeds rssmanager->refreshAll(); // Restore sliders position @@ -484,13 +480,6 @@ RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){ qDebug("RSSImp constructed"); } -void RSSImp::selectFirstFeed(){ - if(listStreams->topLevelItemCount()){ - QTreeWidgetItem *first = listStreams->topLevelItem(0); - listStreams->setCurrentItem(first); - } -} - RSSImp::~RSSImp(){ qDebug("Deleting RSSImp..."); delete listStreams; diff --git a/src/rss_imp.h b/src/rss_imp.h index 139fc1cb6..e1058a968 100644 --- a/src/rss_imp.h +++ b/src/rss_imp.h @@ -68,7 +68,6 @@ protected slots: void openNewsUrl(); void downloadTorrent(); void fillFeedsList(QTreeWidgetItem *parent=0, RssFolder *rss_parent=0); - void selectFirstFeed(); void saveSlidersPosition(); void restoreSlidersPosition(); void showFeedDownloader(); diff --git a/src/src.pro b/src/src.pro index 00e16c1fa..076616baf 100644 --- a/src/src.pro +++ b/src/src.pro @@ -14,7 +14,7 @@ CONFIG += qt \ network # Update this VERSION for each release -DEFINES += VERSION=\\\"v1.5.0beta1\\\" +DEFINES += VERSION=\\\"v1.5.0beta2\\\" DEFINES += VERSION_MAJOR=1 DEFINES += VERSION_MINOR=5 DEFINES += VERSION_BUGFIX=0