textinput/peninputfingerhwr/src/peninputfingerhwrrangeselector.cpp
branchRCL_3
changeset 11 c8fb4cf7b3ae
parent 7 6defe5d1bd39
child 12 5e18d8c489d6
--- a/textinput/peninputfingerhwr/src/peninputfingerhwrrangeselector.cpp	Tue Apr 27 16:59:43 2010 +0300
+++ b/textinput/peninputfingerhwr/src/peninputfingerhwrrangeselector.cpp	Tue May 11 16:31:42 2010 +0300
@@ -183,6 +183,11 @@
 CFepUiBaseCtrl* CPeninputFingerHwrRangeSelector::HandlePointerDownEventL(
     const TPoint& aPoint )
     {
+    // Cancel all highlighted button, when pressing down
+	iRangeChBtn->SetHighlight( EFalse );
+	iRangeEnBtn->SetHighlight( EFalse );
+	iRangeNumBtn->SetHighlight( EFalse );
+
     CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerDownEventL( aPoint );
     
     if ( !ctrl )
@@ -205,6 +210,14 @@
     {
     CFepUiBaseCtrl* ctrl = CControlGroup::HandlePointerUpEventL( aPoint );
 
+    // When upCtrl does not equal to down ctrl, restore the highlight button state.
+    if (ctrl != iCtrlWithPointerDown)
+         {
+         iRangeChBtn->SetHighlight( iCurRange == EFingerHwrNativeRange );
+         iRangeEnBtn->SetHighlight( iCurRange == EFingerHwrEnglishRange );
+         iRangeNumBtn->SetHighlight( iCurRange == EFingerHwrNumberRange );
+         }
+
     iRangeChBtn->CancelPointerDownL();
     iRangeEnBtn->CancelPointerDownL();
     iRangeNumBtn->CancelPointerDownL();