phoneuis/dialer/src/cdialernumberentry.cpp
branchRCL_3
changeset 20 3c221667e687
parent 14 b8d67d6176f5
child 23 40a3f856b14d
--- a/phoneuis/dialer/src/cdialernumberentry.cpp	Wed Jun 09 09:41:11 2010 +0300
+++ b/phoneuis/dialer/src/cdialernumberentry.cpp	Mon Jun 21 15:39:45 2010 +0300
@@ -153,21 +153,26 @@
         
 // ---------------------------------------------------------------------------
 // CDialerNumberEntry::SetFocus
+// 
+// IsFocused() and iEditor->IsFocused() may return other values besides ETrue
+// and EFalse. This is why we need to check their return values against zero
+// and use the result in comparison against aFocus.
 // ---------------------------------------------------------------------------
 //
 void CDialerNumberEntry::SetFocus( TBool aFocus, TDrawNow aDrawNow )
     {
     DIALER_PRINT("numberentry::SetFocus<");
     
-    if ( aFocus != IsFocused() )
+    if ( aFocus != ( IsFocused() ? ETrue : EFalse ) )
         {
         CCoeControl::SetFocus( aFocus, aDrawNow );
         }
     
-    if ( aFocus != iEditor->IsFocused() )
+    if ( aFocus != ( iEditor->IsFocused() ? ETrue : EFalse ) )
         {
         iEditor->SetFocus( aFocus );
         }
+    
     DIALER_PRINT("numberentry::SetFocus>");
     }