Fixed bug in duplicating layers

This commit is contained in:
unsettledgames 2020-09-18 12:32:59 +02:00
parent 47d36a4883
commit 09c68fd847

View File

@ -486,7 +486,7 @@ function duplicateLayer(event, saveHistory = true) {
let menuEntries = layerList.children;
// Increasing z-indexes of the layers above
for (let i=getMenuEntryIndex(menuEntries, toDuplicate.menuEntry) - 1; i>0; i--) {
for (let i=getMenuEntryIndex(menuEntries, toDuplicate.menuEntry) - 1; i>=0; i--) {
getLayerByID(menuEntries[i].id).canvas.style.zIndex++;
}
maxZIndex++;