From d8ff1e04793889d837df7343fae55ac03fec6d44 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sun, 16 Jan 2022 00:55:28 -0500 Subject: [PATCH] prevent mouse selection of hidden objects --- src/main/mesh.js | 2 +- src/mesh/api.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/mesh.js b/src/main/mesh.js index f75e912c..13a0bafe 100644 --- a/src/main/mesh.js +++ b/src/main/mesh.js @@ -401,7 +401,7 @@ function space_init(data) { } } } else { - return api.objects(); + return api.objects().filter(o => o.visible); } }); diff --git a/src/mesh/api.js b/src/mesh/api.js index 6c9b2bd9..6181ebb8 100644 --- a/src/mesh/api.js +++ b/src/mesh/api.js @@ -36,7 +36,7 @@ let toggle = { let selection = { // @returns {MeshObject[]} or all groups if not strict and no selection list(strict = false) { - return selected.length || strict ? selected.slice() : groups.slice(); + return selected.length || strict ? selected.slice() : groups.slice(); }, // return selected groups + groups from selected models