mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-23 16:31:20 +08:00
Fix UV editor not updating after duplicating element
This commit is contained in:
parent
a38bde05ae
commit
a72c70039e
@ -1882,15 +1882,6 @@ Interface.definePanels(function() {
|
||||
lines.push(`M${x*size} ${0} L${x*size} ${this.inner_height}`);
|
||||
}
|
||||
return lines.join(' ');
|
||||
},
|
||||
displayed_uv_elements() {
|
||||
if (this.mode == 'uv' || this.uv_overlay) {
|
||||
return (this.display_uv === 'all_elements' || this.mode == 'paint')
|
||||
? this.all_mappable_elements
|
||||
: this.mappable_elements;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -2861,6 +2852,15 @@ Interface.definePanels(function() {
|
||||
toPixels(uv_coord, offset = 0) {
|
||||
return (uv_coord / this.project_resolution[0] * this.inner_width + offset) + 'px'
|
||||
},
|
||||
getDisplayedUVElements() {
|
||||
if (this.mode == 'uv' || this.uv_overlay) {
|
||||
return (this.display_uv === 'all_elements' || this.mode == 'paint')
|
||||
? this.all_mappable_elements
|
||||
: this.mappable_elements;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
getMeshFaceOutline(face) {
|
||||
let coords = [];
|
||||
let uv_offset = [
|
||||
@ -3173,7 +3173,7 @@ Interface.definePanels(function() {
|
||||
:style="{width: inner_width + 'px', height: inner_height + 'px', margin: getFrameMargin(true)}"
|
||||
>
|
||||
|
||||
<template v-for="element in displayed_uv_elements">
|
||||
<template v-for="element in getDisplayedUVElements()">
|
||||
|
||||
<template v-if="element.type == 'cube' && !element.box_uv">
|
||||
<div class="cube_uv_face"
|
||||
|
Loading…
Reference in New Issue
Block a user