Fix undo not saving face textures

This commit is contained in:
JannisX11 2020-07-18 12:23:06 +02:00
parent 2c8c617bb4
commit d2a30bffee
2 changed files with 8 additions and 1 deletions

View File

@ -224,6 +224,7 @@
height: 100%;
width: 100%;
padding: 0 12px;
cursor: inherit;
}
#web_download_button:hover a {
color: var(--color-accent_text);

View File

@ -81,6 +81,12 @@ class Face {
}
return copy;
}
getUndoCopy() {
var copy = new Face(this.direction, this);
delete copy.cube;
delete copy.direction;
return copy;
}
}
Face.opposite = {
north: 'south',
@ -287,7 +293,7 @@ class Cube extends NonGroup {
}
}
for (let face_id in copy.faces) {
copy.faces[face_id] = copy.faces[face_id].getSaveCopy()
copy.faces[face_id] = copy.faces[face_id].getUndoCopy()
}
copy.uuid = this.uuid
copy.type = this.type;