calendarui/controller/src/calendeleteui.cpp
branchRCL_3
changeset 15 9711e452b5e9
parent 14 21239b3bcd78
child 28 96907930389d
--- a/calendarui/controller/src/calendeleteui.cpp	Wed Apr 14 15:55:57 2010 +0300
+++ b/calendarui/controller/src/calendeleteui.cpp	Tue Apr 27 16:36:22 2010 +0300
@@ -41,6 +41,7 @@
 #include <calcalendarinfo.h>
 #include <calentoolbar.h>
 #include <akntoolbar.h>
+#include <CalenAttachmentModel.h>
 
 #include "calendarui_debug.h"           // Debug
 #include "calendeleteui.h"
@@ -586,13 +587,13 @@
 //
 void CCalenDeleteUi::HandleDeleteMultipleEventsL( const TTime& aFirstDay,
                                                                      const TTime& aLastDay,
-                                                                     TInt aConfNoteId )
+                                                                     TInt /*aConfNoteId */)
     {
     TRACE_ENTRY_POINT;
 
     ASSERT( !iWaitDialog );
     ASSERT( !iIsDeleting );
-    iConfirmationNoteId = aConfNoteId;
+    //iConfirmationNoteId = aConfNoteId;
 
     iWaitDialog = new( ELeave ) CAknWaitDialog( REINTERPRET_CAST( CEikDialog**, 
                                                                   &iWaitDialog ) );
@@ -690,10 +691,10 @@
 		if( aFirstPassError == KErrNone )
 			{
 			// Show confirmation note
-			HBufC* buf = StringLoader::LoadLC( iConfirmationNoteId, iEikEnv );
-			CAknConfirmationNote* dialog = new( ELeave ) CAknConfirmationNote();
-			dialog->ExecuteLD(*buf);
-			CleanupStack::PopAndDestroy( buf );
+//			HBufC* buf = StringLoader::LoadLC( iConfirmationNoteId, iEikEnv );
+//			CAknConfirmationNote* dialog = new( ELeave ) CAknConfirmationNote();
+//			dialog->ExecuteLD(*buf);
+//			CleanupStack::PopAndDestroy( buf );
 			}
 		else
 			{
@@ -891,6 +892,12 @@
         
     if( doDelete )
         {
+        //Before deleteing the entry reset the attachment model
+        if(iController.Services().GetAttachmentData()->NumberOfItems())
+            {
+            iController.Services().GetAttachmentData()->Reset();
+            }
+        
         if( !TryDeleteWithMrUtilsL( aInstance, aRepeatType ) )
             {
             if( !child || aRepeatType == CalCommon::EThisOnly )