mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-30 15:42:42 +08:00
Fix issue with undo+redo after deleting a group
This commit is contained in:
parent
63e45e2fe3
commit
c61a20b12a
@ -172,8 +172,8 @@ class Group extends OutlinerNode {
|
||||
}
|
||||
remove(undo) {
|
||||
var scope = this;
|
||||
let elements = [];
|
||||
if (undo) {
|
||||
let elements = []
|
||||
this.forEachChild(function(element) {
|
||||
if (element.type !== 'group') {
|
||||
elements.push(element)
|
||||
@ -200,6 +200,7 @@ class Group extends OutlinerNode {
|
||||
this.constructor.all.remove(this);
|
||||
delete OutlinerNode.uuids[this.uuid];
|
||||
if (undo) {
|
||||
elements.empty();
|
||||
Undo.finishEdit('Delete group')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user