mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-04-06 17:31:09 +08:00
Fix #2401 Cuve face selection issue when selecting group
When selecting multiple cubes, inherit the face selection from the first selected cube Tweak issue template to explain what format means
This commit is contained in:
parent
4d701548b2
commit
5d90a5a062
1
.github/ISSUE_TEMPLATE/issue.yaml
vendored
1
.github/ISSUE_TEMPLATE/issue.yaml
vendored
@ -29,6 +29,7 @@ body:
|
||||
id: format
|
||||
attributes:
|
||||
label: Model format in which the issue occurs
|
||||
description: Format means which option you choose when creating a new model. Not the file extension.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
@ -252,6 +252,18 @@ class Cube extends OutlinerElement {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
selectLow(...args) {
|
||||
let was_selected = this.selected;
|
||||
super.selectLow(...args);
|
||||
if (!was_selected && Cube.selected[0]) {
|
||||
let other_selected_faces = UVEditor.selected_faces.slice();
|
||||
let own_selected_faces = UVEditor.getSelectedFaces(this, true);
|
||||
if (other_selected_faces?.length && !own_selected_faces?.length) {
|
||||
own_selected_faces.replace(other_selected_faces);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
size(axis, floored) {
|
||||
var scope = this;
|
||||
let epsilon = 0.0000001;
|
||||
|
@ -68,10 +68,11 @@ class Group extends OutlinerNode {
|
||||
var scope = this;
|
||||
if (Blockbench.hasFlag('renaming') || this.locked) return this;
|
||||
if (!event) event = true
|
||||
var allSelected = Group.selected === this && selected.length && this.matchesSelection()
|
||||
var allSelected = Group.selected === this && selected.length && this.matchesSelection();
|
||||
let previous_first_selected = Project.selected_elements[0];
|
||||
|
||||
//Clear Old Group
|
||||
if (Group.selected) Group.selected.unselect()
|
||||
if (Group.selected) Group.selected.unselect();
|
||||
if ((event.shiftKey || Pressing.overrides.shift) !== true && (event.ctrlOrCmd || Pressing.overrides.ctrl) !== true) {
|
||||
selected.length = 0
|
||||
}
|
||||
@ -87,6 +88,10 @@ class Group extends OutlinerNode {
|
||||
//Select Only Group, unselect Children
|
||||
selected.length = 0
|
||||
} else {
|
||||
// Fix for #2401
|
||||
if (previous_first_selected && previous_first_selected.isChildOf(this)) {
|
||||
selected.push(previous_first_selected);
|
||||
}
|
||||
scope.children.forEach(function(s) {
|
||||
s.selectLow()
|
||||
})
|
||||
|
@ -478,7 +478,9 @@ class OutlinerElement extends OutlinerNode {
|
||||
|
||||
//Normal
|
||||
} else {
|
||||
selected.forEachReverse(obj => obj.unselect())
|
||||
selected.forEachReverse(obj => {
|
||||
if (obj != this) obj.unselect();
|
||||
})
|
||||
if (Group.selected) Group.selected.unselect()
|
||||
this.selectLow()
|
||||
just_selected.push(this)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Blockbench",
|
||||
"description": "Low-poly modeling and animation software",
|
||||
"version": "4.10.3",
|
||||
"version": "4.10.4",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"author": {
|
||||
"name": "JannisX11",
|
||||
|
Loading…
x
Reference in New Issue
Block a user