psln/Src/PslnGeneralThemeContainer.cpp
branchRCL_3
changeset 9 aabf2c525e0f
parent 0 2f259fa3e83a
child 15 08e69e956a8c
--- a/psln/Src/PslnGeneralThemeContainer.cpp	Fri Feb 19 23:04:46 2010 +0200
+++ b/psln/Src/PslnGeneralThemeContainer.cpp	Fri Mar 12 15:43:43 2010 +0200
@@ -592,6 +592,11 @@
     // First stop timer.
     iPreviewIdle->Cancel();
     
+    // No re-preview the same theme
+    if( iActiveSkinItemIndex == iListBox->CurrentItemIndex() )
+        {
+        return;
+        }
 
     // Check free mem
     TInt freeMem = 0;
@@ -607,13 +612,13 @@
         return;
         }
 
+    iActiveSkinItemIndex = iListBox->CurrentItemIndex();
     // Ignore download skin item if it is available.
     TInt modifier = IsEmbeddedLinkVisible();
-    TInt activeSkinIndex = iListBox->CurrentItemIndex() - modifier;
+    TInt activeSkinIndex = iActiveSkinItemIndex - modifier;
     
     TBool usbAttached = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->USBAttachState();
             
-    iActiveSkinItemIndex = iListBox->CurrentItemIndex();
     if( iModel->IsValidForPreview(activeSkinIndex) == EFalse )
         {
         // If skin file didn't valid, preview active skin.