Fix some face selection issues in #2378

This commit is contained in:
JannisX11 2024-06-12 21:47:09 +02:00
parent f4553612dd
commit cef79905aa
2 changed files with 4 additions and 1 deletions

View File

@ -504,6 +504,9 @@ class OutlinerElement extends OutlinerNode {
unselect() {
Project.selected_elements.remove(this);
this.selected = false;
if (UVEditor.selected_element_faces[this.uuid]) {
delete UVEditor.selected_element_faces[this.uuid];
}
TickUpdates.selection = true;
return this;
}

View File

@ -781,7 +781,7 @@ class Preview {
if (Toolbox.selected.selectElements && Modes.selected.selectElements && (data.type === 'element' || Toolbox.selected.id == 'knife_tool')) {
if (Toolbox.selected.selectFace && data.face && data.element.type != 'mesh') {
let face_selection = UVEditor.getSelectedFaces(data.element, true);
if (event.ctrlOrCmd || Pressing.overrides.ctrl || event.shiftKey || Pressing.overrides.shift) {
if (data.element.selected && (event.ctrlOrCmd || Pressing.overrides.ctrl || event.shiftKey || Pressing.overrides.shift)) {
face_selection.safePush(data.face);
} else {
face_selection.replace([data.face]);