--- a/application/src/PodcastQueueView.cpp Wed Jul 14 14:53:21 2010 +0100
+++ b/application/src/PodcastQueueView.cpp Thu Jul 15 22:43:10 2010 +0100
@@ -142,7 +142,7 @@
void CPodcastQueueView::UpdateListboxItemsL()
{
- if (iListContainer->IsVisible())
+ if (iListContainer->IsVisible() && !iDontUpdateList)
{
TListItemProperties itemProps;
TInt len = 0;
@@ -236,7 +236,17 @@
TInt index = iListContainer->Listbox()->CurrentItemIndex();
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
{
+ // this is an ugly hack to prevent UpdateListboxItemsL from being
+ // triggered from the show engine, which causes focus to jump
+ // around in an ugly fashion
+ iDontUpdateList = ETrue;
TRAP_IGNORE(iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid()));
+ iDontUpdateList = EFalse;
+ }
+ UpdateListboxItemsL();
+ if (index > 0)
+ {
+ iListContainer->Listbox()->SetCurrentItemIndex(index - 1);
}
}
break;