]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #6642
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 12:38:16 +0000 (12:38 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 12:38:16 +0000 (12:38 +0000)
svn changeset:18410/svn branch:6.5

src/com/vaadin/terminal/gwt/client/ui/VUpload.java

index dc9b5ba5455a3e3aa05653460cd78c6a4b2f4a05..55bc0b62194b2976508faab7db76674d608ff33e 100644 (file)
@@ -223,23 +223,25 @@ public class VUpload extends SimplePanel implements Paintable {
         /* Needs to be run dereferred to avoid various browser issues. */
         Scheduler.get().scheduleDeferred(new Command() {
             public void execute() {
-                if (client != null) {
-                    if (t != null) {
-                        t.cancel();
+                if (submitted) {
+                    if (client != null) {
+                        if (t != null) {
+                            t.cancel();
+                        }
+                        VConsole.log("VUpload:Submit complete");
+                        client.sendPendingVariableChanges();
                     }
-                    VConsole.log("VUpload:Submit complete");
-                    client.sendPendingVariableChanges();
-                }
 
-                rebuildPanel();
+                    rebuildPanel();
 
-                submitted = false;
-                enableUpload();
-                if (!isAttached()) {
-                    /*
-                     * Upload is complete when upload is already abandoned.
-                     */
-                    cleanTargetFrame();
+                    submitted = false;
+                    enableUpload();
+                    if (!isAttached()) {
+                        /*
+                         * Upload is complete when upload is already abandoned.
+                         */
+                        cleanTargetFrame();
+                    }
                 }
             }
         });