mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix #1984 Mesh merge undo does not track hierarchy
Fix amend edit can undo other changes after error in function Fix issue with loading backups
This commit is contained in:
parent
376a4f4778
commit
7f3d92f46b
@ -517,7 +517,7 @@ onVueSetup(function() {
|
||||
|
||||
let model = parsed_backup_models[uuid];
|
||||
setupProject(Formats[model.meta.model_format] || Formats.free, uuid);
|
||||
Codecs.project.parse(model, file.path)
|
||||
Codecs.project.parse(model, 'backup.bbmodel')
|
||||
}
|
||||
section.delete();
|
||||
}},
|
||||
|
@ -1786,7 +1786,7 @@ BARS.defineActions(function() {
|
||||
condition: {modes: ['edit'], features: ['meshes'], method: () => (Mesh.selected.length >= 2)},
|
||||
click() {
|
||||
let elements = Mesh.selected.slice();
|
||||
Undo.initEdit({elements});
|
||||
Undo.initEdit({elements, outliner: true});
|
||||
let original = Mesh.selected[0];
|
||||
let vector = new THREE.Vector3();
|
||||
|
||||
|
@ -104,6 +104,10 @@ class UndoSystem {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Undo.history.length != Undo.index) {
|
||||
console.error('Detected error in amending edit. Skipping this edit.');
|
||||
return;
|
||||
}
|
||||
Undo.undo(null, true);
|
||||
callback(form_values, scope.amend_edit_menu.form);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user