Merge pull request #174 from nathan/backpack-duplicates

Fixed duplication when dragging media into the backpack
This commit is contained in:
Nathan Dinsmore 2014-06-24 13:18:23 -04:00
commit 580148cbf2

View file

@ -452,9 +452,13 @@ public class GestureHandler {
possibleTargets.push(app.stagePane); possibleTargets.push(app.stagePane);
} }
possibleTargets.reverse(); possibleTargets.reverse();
var tried:Array = [];
for each (var o:* in possibleTargets) { for each (var o:* in possibleTargets) {
while (o) { // see if some parent can handle the drop 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; o = o.parent;
} }
} }