Browse files

MythNews: try to keep the same item selected in the articles list aft…

…er update

This fixes the annoying behaviour of the selection moving to the first item in
the articles list after the list is refreshed. It will now try to
keep the same item selected after the articles list is updated.
  • Loading branch information...
Paul Harrison
Paul Harrison committed Jun 15, 2013
1 parent d107852 commit 0cbca168321f862e81d557612b24fef4b967bbb2
Showing with 6 additions and 0 deletions.
  1. +6 −0 mythplugins/mythnews/mythnews/mythnews.cpp
@@ -651,6 +651,9 @@ void MythNews::processAndShowNews(NewsSite *site)
if (site != qVariantValue<NewsSite*>(siteUIItem->GetData()))
QString currItem = m_articlesList->GetValue();
int topPos = m_articlesList->GetTopItemPos();
@@ -662,6 +665,9 @@ void MythNews::processAndShowNews(NewsSite *site)
new MythUIButtonListItem(m_articlesList, (*it).title());
m_articles[item] = *it;
if (m_articlesList->MoveToNamedPosition(currItem))
m_articlesList->SetItemCurrent(m_articlesList->GetCurrentPos(), topPos);
void MythNews::slotSiteSelected(MythUIButtonListItem *item)

0 comments on commit 0cbca16

Please sign in to comment.