calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp
branchRCL_3
changeset 60 96907930389d
parent 48 bf573002ff72
child 67 1539a383d7b6
--- a/calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp	Thu Jul 15 18:37:27 2010 +0300
+++ b/calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp	Thu Aug 19 09:53:43 2010 +0300
@@ -72,9 +72,13 @@
     
     if( ( iNaviLabel != NULL ) && ( iNaviContainer->Top() == iNaviLabel ) )
         {
-        iNaviContainer->Pop( iNaviLabel );
-        delete iNaviLabel;
-        iNaviLabel = NULL;
+        if( iNaviLabel->ControlType() == CAknNavigationDecorator::ENotSpecified 
+                  || iNaviLabel->ControlType() == CAknNavigationDecorator::ENaviLabel)
+            {
+            iNaviContainer->Pop( iNaviLabel );
+            delete iNaviLabel;
+            iNaviLabel = NULL;          
+            }
         }
     
     TRACE_EXIT_POINT;
@@ -158,7 +162,7 @@
          {
          CCoeControl* coeRes = iNaviLabel->DecoratedControl();
          CCustomNaviControl *actualLabel = static_cast<CCustomNaviControl*>(coeRes);
-         actualLabel->SetCalendarNameAndColor(aName, aColor);
+         actualLabel->SetCalendarNameAndColorL(aName, aColor);
          actualLabel->DrawDeferred();
          iNaviContainer->ReplaceL(*iNaviLabel, *iNaviLabel);
          }
@@ -267,7 +271,7 @@
     delete iLongDateFormat;
     delete iMonthArray;
     delete iDayNameArray;
-    if( iNaviLabel )
+    if( iNaviLabel && iNaviContainer->Top() == iNaviLabel)
         {
         delete iNaviLabel;
         }