uifw/AvKon/aknhlist/src/akntreelistview.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 23 3d340a0166ff
--- a/uifw/AvKon/aknhlist/src/akntreelistview.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/aknhlist/src/akntreelistview.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -2768,10 +2768,10 @@
 void CAknTreeListView::DrawItemsWithPhysics( const TRect& aRect ) const
     {
     TBool empty = IsEmpty();
+    TInt offset = Offset();  
 
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST    
     CWindowGc& gc = iGc && !empty ? *iGc : SystemGc();
-    TInt offset = Offset();
 #else
     CWindowGc& gc = SystemGc();
 #endif
@@ -2834,11 +2834,6 @@
 
             if ( iItems[ii].Item() )
                 {
-                if ( !aRect.Intersects(drawRect) )
-                    {
-                    //invisible item yet
-                    continue;
-                    }
 
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
                 TRect tfxDrawRect( drawRect );
@@ -2862,16 +2857,25 @@
                         clippingRect.iBr.iY = viewRect.iBr.iY;
                         }
                     }
+                // Set clipping rect.    
+                if ( clippingRect.Intersects( aRect ) )
+                    {
+                    clippingRect.Intersection( aRect );
+                    gc.SetClippingRect( clippingRect );
+                    }
+                else
+                    {
+                    //Draw nothing if no overlap between item rectangel and given rect.
+                    continue;
+                    }
                 
-                // Set clipping rect.    
-                gc.SetClippingRect( clippingRect );
-
                 if ( transApi )
                     {
                     transApi->StopDrawing();
                     }
 #endif
-                if ( ii < iBottomIndex )
+
+                if ( iItems[ii].Item() != iBottomItem )
                     {
                     TRect offsetRect( drawRect );
                     offsetRect.Move( 0, -offset );
@@ -3158,7 +3162,9 @@
 void CAknTreeListView::LongTapPointerEventL(
         const TPointerEvent& aPointerEvent)
     {
-    if ( iLongTapDetector && iItemActionMenu && iItemActionMenu->InitMenuL() )
+    if ( iLongTapDetector && iItemActionMenu 
+            && !( HasMarkedItemsL() && FocusedItem() 
+            && !FocusedItem()->IsMarked() ) && iItemActionMenu->InitMenuL() )
         {
         iLongTapDetector->PointerEventL( aPointerEvent );
         }
@@ -3246,7 +3252,8 @@
             {
             if (iItems[i].Item())   
                 {
-                iBottomIndex = iTree.VisibleItemIndex(iItems[i].Item());
+                iBottomItem = iItems[i].Item();
+                iBottomIndex = iTree.VisibleItemIndex( iBottomItem );
                 break;
                 }
             }