uifw/AvKon/src/akngridview.cpp
branchRCL_3
changeset 8 71dd06cfe933
parent 3 8ca85d2f0db7
child 19 aecbbf00d063
--- a/uifw/AvKon/src/akngridview.cpp	Wed Mar 31 21:59:52 2010 +0300
+++ b/uifw/AvKon/src/akngridview.cpp	Wed Apr 14 16:14:00 2010 +0300
@@ -1927,22 +1927,30 @@
 		{
 		blankRect.SetRect(ItemPos(i), ItemSize());
 		blankRect.Intersection(iViewRect);
-
-		MAknsSkinInstance *skin = AknsUtils::SkinInstance();
-		CFormattedCellListBoxItemDrawer *id = (CFormattedCellListBoxItemDrawer*)ItemDrawer();
-		if (id->FormattedCellData()->Control())
-			{
-			MAknsControlContext *cc = AknsDrawUtils::ControlContext( id->FormattedCellData()->Control() );
-			if ( !cc )
-			    {
-			    cc = id->FormattedCellData()->SkinBackgroundContext();
-			    }
-			AknsDrawUtils::Background( skin, cc, id->FormattedCellData()->Control(), *iGc, blankRect );
-			}
-		else
-			{
-			iGc->Clear(blankRect);
-			}
+		if ( blankRect.Width() > 0 && blankRect.Height() > 0 )
+		    {
+		    MAknsSkinInstance *skin = AknsUtils::SkinInstance();
+		    CFormattedCellListBoxItemDrawer *id = 
+                (CFormattedCellListBoxItemDrawer*)ItemDrawer();
+		    if ( id->FormattedCellData()->Control())
+		    	{
+		        MAknsControlContext *cc = 
+                    AknsDrawUtils::ControlContext( id->FormattedCellData()->Control() );
+		        if ( !cc )
+		        	{
+		            cc = id->FormattedCellData()->SkinBackgroundContext();
+		        	}
+		        AknsDrawUtils::Background( skin, 
+                                           cc, 
+                                           id->FormattedCellData()->Control(), 
+                                           *iGc, 
+                                           blankRect );
+		    	}
+		    else
+		    	{
+		        iGc->Clear(blankRect);
+		    	}
+		   	}
 		}
 	_AKNTRACE_FUNC_EXIT;
 	}