diff -r 6b5524b4f673 -r 38bb213f60ba phonebookui/Phonebook2/MapExtension/src/cpmapcontacteditorextension.cpp --- a/phonebookui/Phonebook2/MapExtension/src/cpmapcontacteditorextension.cpp Wed Sep 15 11:56:55 2010 +0300 +++ b/phonebookui/Phonebook2/MapExtension/src/cpmapcontacteditorextension.cpp Wed Oct 13 14:15:33 2010 +0300 @@ -19,9 +19,9 @@ // Phonebook 2 #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -52,9 +52,10 @@ #include #include #include -#include -#include +#include +#include #include +#include #include #include @@ -113,7 +114,6 @@ // inline void CPmapContactEditorExtension::ConstructL() { - iMapCommandFinish = ETrue; } // -------------------------------------------------------------------------- @@ -171,53 +171,31 @@ TBool CPmapContactEditorExtension::ProcessCommandL ( TInt aCommandId ) { - TBool result = EFalse; - switch( aCommandId ) { case EPbk2ExtensionShowOnMap: - { - // Ignore new command if the previous command is not finished - if ( iMapCommandFinish ) - { - if(iCmd) - { - delete iCmd; - iCmd = NULL; - } - iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId ); - - // Observer if the Map command is finished - iCmd->AddObserver( *this ); - iMapCommandFinish = EFalse; - - // Execute the command - iCmd->ExecuteLD(); - } - result = ETrue; - break; + { + if(iCmd) + { + delete iCmd; + iCmd = NULL; + } + iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId ); + // Execute the command + iCmd->ExecuteLD(); + return ETrue; } case EPbk2ExtensionAssignFromMap: - { - // Ignore new command if the previous command is not finished - if ( iMapCommandFinish ) + { + if(iCmd) { - if(iCmd) - { - delete iCmd; - iCmd = NULL; - } - iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId ); - - // Observer if the Map command is finished - iCmd->AddObserver( *this ); - iMapCommandFinish = EFalse; - - // Execute the command - iCmd->ExecuteLD(); + delete iCmd; + iCmd = NULL; } - result = ETrue; - break; + iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId ); + // Execute the command + iCmd->ExecuteLD(); + return ETrue; } default: { @@ -225,16 +203,7 @@ break; } } - return result; - } - -// -------------------------------------------------------------------------- -// CPmapContactEditorExtension::CommandFinished -// -------------------------------------------------------------------------- -// -void CPmapContactEditorExtension::CommandFinished(const MPbk2Command& /*aCommand*/) - { - iMapCommandFinish = ETrue; + return EFalse; } // --------------------------------------------------------------------------