]> source.dussan.org Git - vaadin-framework.git/commitdiff
merged fix for #6642
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 12:41:09 +0000 (12:41 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 20 Apr 2011 12:41:09 +0000 (12:41 +0000)
svn changeset:18411/svn branch:6.6

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

index c654ddd88b79e456549406bac5553c7eab4cf247..3c28ea397895dc5ae182b72637969a91c9a9efac 100644 (file)
@@ -243,23 +243,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();
+                    }
                 }
             }
         });