mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Fix undo not saving face textures
This commit is contained in:
parent
2c8c617bb4
commit
d2a30bffee
@ -224,6 +224,7 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0 12px;
|
||||
cursor: inherit;
|
||||
}
|
||||
#web_download_button:hover a {
|
||||
color: var(--color-accent_text);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user