From 159e156d26d3605fd2a9b5d7360d2061072aa97d Mon Sep 17 00:00:00 2001 From: Nathan Dinsmore Date: Wed, 7 May 2014 15:11:16 -0400 Subject: [PATCH] Fixed duplication when dragging media into the backpack --- src/util/GestureHandler.as | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/GestureHandler.as b/src/util/GestureHandler.as index 5085351..960ca49 100644 --- a/src/util/GestureHandler.as +++ b/src/util/GestureHandler.as @@ -432,9 +432,13 @@ public class GestureHandler { possibleTargets.push(app.stagePane); } possibleTargets.reverse(); + var tried:Array = []; for each (var o:* in possibleTargets) { while (o) { // see if some parent can handle the drop - if (('handleDrop' in o) && o.handleDrop(droppedObj)) return true; + if (tried.indexOf(o) == -1) { + if (('handleDrop' in o) && o.handleDrop(droppedObj)) return true; + tried.push(o); + } o = o.parent; } }