diff --git a/src/tilemaps/Tilemap.js b/src/tilemaps/Tilemap.js index 54bba4b10..2867fcff6 100644 --- a/src/tilemaps/Tilemap.js +++ b/src/tilemaps/Tilemap.js @@ -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) {