ImagePrint/ImagePrintUI/imageprintapp/src/cpropertiesboxmodel.cpp
changeset 2 acc370d7f2f6
parent 1 ceeb73e410b5
child 29 bb3bc0aea200
--- a/ImagePrint/ImagePrintUI/imageprintapp/src/cpropertiesboxmodel.cpp	Thu Jan 07 12:46:28 2010 +0200
+++ b/ImagePrint/ImagePrintUI/imageprintapp/src/cpropertiesboxmodel.cpp	Mon Jan 18 20:19:34 2010 +0200
@@ -362,32 +362,33 @@
    
     // Images selected in print job
     TInt imagesCount = iEngine.FileArray().Count(); 
- 
-    // Get number of copies for current image
-    if( numberOfCopiesArray.Count() != imagesCount )
+    if(0 != imagesCount)
         {
-        numberOfCopiesArray.Reset();
-        for( TInt i=0; i < imagesCount; ++i )
+        // Get number of copies for current image
+        if( numberOfCopiesArray.Count() != imagesCount )
             {
-            numberOfCopiesArray.Append( 1 );
+            numberOfCopiesArray.Reset();
+            for( TInt i=0; i < imagesCount; ++i )
+                {
+                numberOfCopiesArray.Append( 1 );
+                }
+            }
+    
+        TInt oldNOC( numberOfCopiesArray[ 0 ] );
+    
+        // if new value was entered
+        if (iNumberOfCopiesValue != oldNOC)
+            {
+            // Set Number of copies value for each image.
+            // Value is same for all images in IP 6.2
+            for ( TInt i=0; i<imagesCount; i++ )
+                {
+                numberOfCopiesArray[ i ] = iNumberOfCopiesValue;
+                }
+            
+            iSettingsIF->SetNumberOfCopiesL( numberOfCopiesArray );
             }
         }
-
-    TInt oldNOC( numberOfCopiesArray[ 0 ] );
-
-    // if new value was entered
-    if (iNumberOfCopiesValue != oldNOC)
-        {
-        // Set Number of copies value for each image.
-        // Value is same for all images in IP 6.2
-        for ( TInt i=0; i<imagesCount; i++ )
-            {
-            numberOfCopiesArray[ i ] = iNumberOfCopiesValue;
-            }
-        
-        iSettingsIF->SetNumberOfCopiesL( numberOfCopiesArray );
-        }
-
     CleanupStack::PopAndDestroy( &numberOfCopiesArray ); 
     }