emailuis/emailui/src/ncsheadercontainer.cpp
changeset 1 12c456ceeff2
parent 0 8466d47a6819
child 2 5253a20d2a1e
equal deleted inserted replaced
0:8466d47a6819 1:12c456ceeff2
   362             {
   362             {
   363             CCoeControl* pOldCtrl = FindFocused();
   363             CCoeControl* pOldCtrl = FindFocused();
   364             CCoeControl* pNewCtrl= clicked;
   364             CCoeControl* pNewCtrl= clicked;
   365             
   365             
   366             if (pOldCtrl != pNewCtrl)
   366             if (pOldCtrl != pNewCtrl)
   367                 {           
   367                 {
   368                 // Unfocus the control
   368                 // Unfocus the control
   369                 if ( pOldCtrl )
   369                 if ( pOldCtrl )
   370                     {
   370                     {
   371                     CommitFieldL( pOldCtrl );
       
   372                     pOldCtrl->SetFocus( EFalse, ENoDrawNow );
   371                     pOldCtrl->SetFocus( EFalse, ENoDrawNow );
   373                     }
   372                     }
   374                 pNewCtrl->SetFocus( ETrue, ENoDrawNow );
   373                 pNewCtrl->SetFocus( ETrue, ENoDrawNow );
       
   374 
       
   375                 // Commit changes to previously focused field.
       
   376                 if ( pOldCtrl )
       
   377                     {
       
   378                     CommitFieldL( pOldCtrl );
       
   379                     }
   375 
   380 
   376                 // If the attachments label has changed focus
   381                 // If the attachments label has changed focus
   377                 if ( pOldCtrl == iAttachmentField || pNewCtrl == iAttachmentField )
   382                 if ( pOldCtrl == iAttachmentField || pNewCtrl == iAttachmentField )
   378                     {
   383                     {
   379                     DrawAttachmentFocusNow();
   384                     DrawAttachmentFocusNow();