mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed bug in duplicating layers
This commit is contained in:
parent
47d36a4883
commit
09c68fd847
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user