diff options
author | Henri Sara <henri.sara@itmill.com> | 2011-07-28 09:33:15 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2011-07-28 09:33:15 +0000 |
commit | a142bc4fc4f4a582f53915ac3eb7872df9429c44 (patch) | |
tree | ec5020fbcf763d2bdf6f99ff0cb7327d4ef9db42 /src | |
parent | 7160aac6540cdd3723b8a34d0e379f6728a1a4ec (diff) | |
parent | 78c1c9b04f3766bf5f99f8ce6784e5ad1a82b44c (diff) | |
download | vaadin-framework-a142bc4fc4f4a582f53915ac3eb7872df9429c44.tar.gz vaadin-framework-a142bc4fc4f4a582f53915ac3eb7872df9429c44.zip |
Merged changes from 6.6
svn changeset:20001/svn branch:6.7
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VTree.java | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/VTree.java index eb8a2e63c5..ed705dbb9e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTree.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTree.java @@ -869,17 +869,24 @@ public class VTree extends FocusElementPanel implements Paintable, final MouseEventDetails details = new MouseEventDetails(evt); ScheduledCommand command = new ScheduledCommand() { public void execute() { - // non-immediate iff an immediate select event is going to - // happen - boolean imm = !immediate - || !selectable - || (!isNullSelectionAllowed && isSelected() && selectedIds - .size() == 1); - client - .updateVariable(paintableId, "clickedKey", key, - false); - client.updateVariable(paintableId, "clickEvent", details - .toString(), imm); + if (details.getButton() == 0) { + // non-immediate iff an immediate select event is going + // to + // happen and the left button was clicked + boolean imm = !immediate + || !selectable + || (!isNullSelectionAllowed && isSelected() && selectedIds + .size() == 1); + client.updateVariable(paintableId, "clickedKey", key, + false); + client.updateVariable(paintableId, "clickEvent", + details.toString(), imm); + } else { + client.updateVariable(paintableId, "clickedKey", key, + false); + client.updateVariable(paintableId, "clickEvent", + details.toString(), immediate); + } } }; if (treeHasFocus) { |