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
This commit is contained in:
Maxim Ermilov 2011-01-31 02:04:56 +03:00 committed by Owen W. Taylor
parent 30346884fe
commit d38f41a459

View File

@ -507,6 +507,9 @@ _Draggable.prototype = {
if (!this._buttonDown) if (!this._buttonDown)
this._dragComplete(); this._dragComplete();
this.emit('drag-end', eventTime, false); this.emit('drag-end', eventTime, false);
if (!this._dragOrigParent)
this._dragActor.destroy();
return; return;
} }