#823 fixed.
authorem.lee <em.lee@localhost>
Wed, 27 Jan 2010 15:08:00 +0000 (15:08 +0000)
committerem.lee <em.lee@localhost>
Wed, 27 Jan 2010 15:08:00 +0000 (15:08 +0000)
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/operations/CreateImageOperation.java

index 309fbd92bc063c156ccddd45b2428ab5c11d8089..0f7711e7da5a10cbeb99d3ed8a042b50cb9abf05 100644 (file)
@@ -59,29 +59,14 @@ public class CreateImageOperation extends AbstractPostOperation {
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
                \r
-               // Start the main progress monitor.\r
-        IProgressMonitor newMonitor = StoreUtil.startMainMonitor(monitor,"Creating Image", 3);\r
-        \r
-        // Do one step\r
-        newMonitor.worked(1);\r
+               if (imageFile == null) {\r
+                       imageFile = ImageFile.NewInstance(null, null);\r
+               }\r
+               monitor.worked(20);\r
 \r
-        try {\r
-               // Operation steps\r
-               \r
-                       if (imageFile == null) {\r
-                               imageFile = ImageFile.NewInstance(null, null);\r
-                       }\r
-                       StoreUtil.isCanceled(newMonitor, 1);\r
+               ImagesUtility.addTaxonImage(taxon, description, imageFile);\r
+               monitor.worked(40);\r
 \r
-                       ImagesUtility.addTaxonImage(taxon, description, imageFile);\r
-                       StoreUtil.isCanceled(newMonitor, 1);\r
-        }\r
-        finally {\r
-               \r
-               // Stop the progress monitor.\r
-            newMonitor.done();\r
-        }\r
-               \r
                return postExecute(imageFile);\r
        }\r
 \r