javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtdateeditor.cpp
branchRCL_3
changeset 25 9ac0a0a7da70
parent 24 0fd27995241b
child 34 71c436fe3ce0
equal deleted inserted replaced
24:0fd27995241b 25:9ac0a0a7da70
    20 #include <swtlaffacade.h>
    20 #include <swtlaffacade.h>
    21 #if defined( RD_SCALABLE_UI_V2 )
    21 #if defined( RD_SCALABLE_UI_V2 )
    22 #include <swtbuttonproxy.h>
    22 #include <swtbuttonproxy.h>
    23 #include <aknconsts.h>
    23 #include <aknconsts.h>
    24 #include <avkon.mbg>
    24 #include <avkon.mbg>
       
    25 #include <fepbase.h>
    25 #endif // RD_SCALABLE_UI_V2
    26 #endif // RD_SCALABLE_UI_V2
    26 #include "swteditindicator.h"
    27 #include "swteditindicator.h"
    27 #include "swtfont.h"
    28 #include "swtfont.h"
    28 #include "swtdateeditor.h"
    29 #include "swtdateeditor.h"
    29 
    30 
    65 // CSwtDateEditor::~CSwtDateEditor
    66 // CSwtDateEditor::~CSwtDateEditor
    66 // ---------------------------------------------------------------------------------------------
    67 // ---------------------------------------------------------------------------------------------
    67 //
    68 //
    68 CSwtDateEditor::~CSwtDateEditor()
    69 CSwtDateEditor::~CSwtDateEditor()
    69 {
    70 {
    70     iEikonEnv->SyncNotifyFocusObserversOfChangeInFocus();
       
    71     delete iEditor;
    71     delete iEditor;
    72     delete iIndicator;
    72     delete iIndicator;
    73     if (iDefaultFont)
    73     if (iDefaultFont)
    74     {
    74     {
    75         iDefaultFont->RemoveRef();
    75         iDefaultFont->RemoveRef();
   200 // ---------------------------------------------------------------------------------------------
   200 // ---------------------------------------------------------------------------------------------
   201 // CSwtDateEditor::FocusChanged
   201 // CSwtDateEditor::FocusChanged
   202 // ---------------------------------------------------------------------------------------------
   202 // ---------------------------------------------------------------------------------------------
   203 //
   203 //
   204 void CSwtDateEditor::FocusChanged(TDrawNow aDrawNow)
   204 void CSwtDateEditor::FocusChanged(TDrawNow aDrawNow)
   205 {
   205 {    
   206     if (iEditor)
   206     if (iEditor)
   207     {
   207     {
   208         TRAP_IGNORE(PrepareForFocusChangeL());
   208         TRAP_IGNORE(PrepareForFocusChangeL());
       
   209         
       
   210         // Aparenlty this is the only way of forcing the VKB to close.
       
   211         if (iEditor->IsFocused() && !IsFocused())
       
   212         {
       
   213             iDisplay.CoeEnv()->Fep()->HandleDestructionOfFocusedItem();
       
   214         }
       
   215         
   209         iEditor->SetFocus(IsFocused());
   216         iEditor->SetFocus(IsFocused());
   210     }
   217     }
   211 
   218 
   212     HandleFocusChanged(aDrawNow);
   219     HandleFocusChanged(aDrawNow);
   213 }
   220 }