prevent incompatible types in selection
This commit is contained in:
parent
a594999292
commit
acc6f652c2
1 changed files with 11 additions and 0 deletions
|
|
@ -76,6 +76,17 @@ const selection = {
|
|||
|
||||
// @param group {MeshObject}
|
||||
add(object, tool = mode.is([ modes.tool ])) {
|
||||
// eject incompatible types from selection
|
||||
switch (object.type) {
|
||||
case 'sketch':
|
||||
selected = selected.filter(s => s.type === 'sketch');
|
||||
tools.length = 0;
|
||||
break;
|
||||
case 'group':
|
||||
case 'model':
|
||||
selected = selected.filter(s => s.type !== 'sketch');
|
||||
break;
|
||||
}
|
||||
// when group added, add group models instead
|
||||
if (object.models) {
|
||||
for (let m of object.models) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue