diff -r c8382f7b54ef -r 726fba06891a meetingrequest/mrgui/mrfieldbuilderplugin/src/cmrviewerattachmentfield.cpp --- a/meetingrequest/mrgui/mrfieldbuilderplugin/src/cmrviewerattachmentfield.cpp Wed Sep 15 11:52:37 2010 +0300 +++ b/meetingrequest/mrgui/mrfieldbuilderplugin/src/cmrviewerattachmentfield.cpp Wed Oct 13 14:11:15 2010 +0300 @@ -155,6 +155,7 @@ EFalse ); iRichTextViewer->SetSkinBackgroundControlContextL( iBgCtrlContext ); + iSelectedLink = NULL; } // --------------------------------------------------------------------------- @@ -467,6 +468,15 @@ if ( IsValidAttachmentViewerCommand(aCommand) && iAttachmentCommandHandler ) { const CESMRRichTextLink* currentLink = iRichTextViewer->GetSelectedLink(); + // remember the state if Saving all is not in progress + if( currentLink && !iAttachmentCommandHandler->IsSaveAllAttachmentsInProgress() ) + { + iSelectedLink = currentLink; + } + else + { + currentLink = iSelectedLink;// restore link when selection is lost + } ASSERT( currentLink ); @@ -758,7 +768,14 @@ { FUNC_LOG; - if ( iRichTextViewer->Rect().Contains( aPosition ) ) + // prevent link selection if SaveAllAttachments is in progress + TBool saveAllInProgress ( EFalse ); + if( iAttachmentCommandHandler ) + { + saveAllInProgress = iAttachmentCommandHandler->IsSaveAllAttachmentsInProgress( ); + } + + if ( !saveAllInProgress && iRichTextViewer->Rect().Contains( aPosition ) ) { iRichTextViewer->LinkSelectedL(); } @@ -778,7 +795,15 @@ if( iAttachmentCount > 0 && aPointerEvent.iType == TPointerEvent::EButton1Up ) { - if( iRichTextViewer->Rect().Contains( aPointerEvent.iPosition ) ) + + // prevent handling events if SaveAllAttachments is in progress + TBool saveAllInProgress ( EFalse ); + if( iAttachmentCommandHandler ) + { + saveAllInProgress = iAttachmentCommandHandler->IsSaveAllAttachmentsInProgress( ); + } + + if( !saveAllInProgress && iRichTextViewer->Rect().Contains( aPointerEvent.iPosition ) ) { iRichTextViewer->HandlePointerEventL( aPointerEvent ); ret = ETrue;