Fixed issue with removing children with filters

This commit is contained in:
Mat Groves 2013-12-03 12:05:22 +00:00
parent 5785e64b0c
commit 86e51af5c0
4 changed files with 10 additions and 4 deletions

View file

@ -1553,14 +1553,17 @@ PIXI.DisplayObjectContainer.prototype.removeChild = function(child)
if(this.last == childLast)
{
var tempLast = childFirst._iPrev;
// need to make sure the parents last is updated too
var updateLast = this;
while(updateLast.last == childLast.last)
while(updateLast.last == childLast)
{
updateLast.last = tempLast;
updateLast = updateLast.parent;
if(!updateLast)break;
}
}