application/src/PodcastListView.cpp
changeset 4 be243543a361
parent 2 29cda98b007e
child 13 f58e3c482bd9
--- a/application/src/PodcastListView.cpp	Thu Feb 25 15:23:53 2010 +0000
+++ b/application/src/PodcastListView.cpp	Thu Feb 25 16:02:42 2010 +0000
@@ -355,7 +355,12 @@
 void CPodcastListView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
 {
 	DP("CPodcastListView::HandleLongTapEventL BEGIN");
-    if(iStylusPopupMenu)
+	
+	const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1
+	TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems(
+			iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight;
+
+    if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight)
     {
 		iStylusPopupMenu->ShowMenu();
 		iStylusPopupMenu->SetPosition(aPenEventLocation);