From d38f41a459e3ce8bc11aeeca1efae443df49f73b Mon Sep 17 00:00:00 2001 From: Maxim Ermilov Date: Mon, 31 Jan 2011 02:04:56 +0300 Subject: [PATCH] dnd: If needed, destroy _dragActor in _cancelDrag In the case where the original actor is destroyed, we don't show a snap back animation, so we need to destroy drag actor as we would do in _onAnimationComplete. https://bugzilla.gnome.org/show_bug.cgi?id=640781 --- js/ui/dnd.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 46d32fdd3..46440d6ff 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -507,6 +507,9 @@ _Draggable.prototype = { if (!this._buttonDown) this._dragComplete(); this.emit('drag-end', eventTime, false); + if (!this._dragOrigParent) + this._dragActor.destroy(); + return; }