From 7f57445798a75b9ee0f128c11a02db98462ab8f6 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Wed, 20 Apr 2011 12:41:09 +0000 Subject: [PATCH] merged fix for #6642 svn changeset:18411/svn branch:6.6 --- .../terminal/gwt/client/ui/VUpload.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VUpload.java b/src/com/vaadin/terminal/gwt/client/ui/VUpload.java index c654ddd88b..3c28ea3978 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VUpload.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VUpload.java @@ -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(); + } } } }); -- 2.39.5