Merge pull request #4836 from Olliebrown/tilemap_remove_bug

Fix for bug related to Issue #4737
This commit is contained in:
Richard Davey 2019-11-18 15:58:51 +00:00 committed by GitHub
commit f36235319f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1564,6 +1564,13 @@ var Tilemap = new Class({
if (index !== null)
{
SpliceOne(this.layers, index);
for (var i = index; i < this.layers.length; i++)
{
if (this.layers[i].tilemapLayer)
{
this.layers[i].tilemapLayer.layerIndex--;
}
}
if (this.currentLayerIndex === index)
{