mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-18 15:26:19 +08:00
Fix #1613 Duplicate texture ids when merging projects
Fix locators and null objects not being selectable via area select
This commit is contained in:
parent
91df921b25
commit
9a82da08e2
@ -450,6 +450,11 @@ var codec = new Codec('project', {
|
||||
tex.uuid = tex_uuid_map[tex.uuid];
|
||||
}
|
||||
var tex_copy = new Texture(tex, tex.uuid).add(false);
|
||||
let c = 0;
|
||||
while (Texture.all.find(t => t !== tex_copy && t.id == c)) {
|
||||
c++;
|
||||
tex_copy.id = c.toString();
|
||||
}
|
||||
if (isApp && tex.path && fs.existsSync(tex.path) && !model.meta.backup) {
|
||||
tex_copy.fromPath(tex.path)
|
||||
return tex_copy;
|
||||
|
@ -1156,7 +1156,7 @@ class Preview {
|
||||
isSelected = true
|
||||
|
||||
} else if (element.visibility) {
|
||||
if (element.mesh && element.mesh.geometry) {
|
||||
if (element.mesh && element.resizable) {
|
||||
let {mesh} = element;
|
||||
|
||||
if (element instanceof Mesh && (selection_mode == 'object' || scope.selection.old_selected.includes(element))) {
|
||||
|
Loading…
Reference in New Issue
Block a user