From 361b53c6d10421088d0b3487e8d9f017e2928f74 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 5 Jan 2022 22:38:31 -0500 Subject: [PATCH] default showing metrics for all when non selected --- src/main/mesh.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/mesh.js b/src/main/mesh.js index 66a0ed11..41256ba6 100644 --- a/src/main/mesh.js +++ b/src/main/mesh.js @@ -149,7 +149,8 @@ function ui_build() { g.models.map(m => h.button({ _: m.file || m.id, class: selHas(m) ? [ 'selected' ] : [], onclick(e) { - e.shiftKey ? + let sel = api.selection.list(); + e.shiftKey || (sel.length === 1 && m === sel[0]) ? api.selection.toggle(m) : api.selection.set([m]) } @@ -161,8 +162,8 @@ function ui_build() { function update_selection() { let map = { fixed: 2 }; - let s_grp = api.selection.groups(true); - let s_mdl = api.selection.models(true); + let s_grp = api.selection.groups(); + let s_mdl = api.selection.models(); if (s_mdl.length === 0) { return h.bind(selectlist, []); }