default unselected mesh info is all objects

This commit is contained in:
Stewart Allen 2021-10-09 17:28:49 -04:00
commit ca84758021
2 changed files with 8 additions and 3 deletions

View file

@ -2603,7 +2603,10 @@
$('mode-sla').onclick = () => { API.mode.set('SLA') };
$('mode-cam').onclick = () => { API.mode.set('CAM') };
$('mode-laser').onclick = () => { API.mode.set('LASER') };
$('unrotate').onclick = () => { API.widgets.for(w => w.unrotate()) };
$('unrotate').onclick = () => {
API.widgets.for(w => w.unrotate());
API.selection.update_info();
};
$('lay-flat').onclick = () => { API.event.emit("tool.mesh.lay-flat") };
// rotation buttons
let d = (Math.PI / 180) * 5;

View file

@ -91,6 +91,7 @@
for_meshes: forSelectedMeshes,
for_widgets: forSelectedWidgets,
update_bounds: updateSelectedBounds,
update_info: updateSelectedInfo,
delete: function() { platform.delete(selection.widgets()) },
export: exportSelection
};
@ -1847,13 +1848,14 @@
}
function platformUpdateSelected() {
let selcount = platform.selected_count();
let selwid = selection.widgets(true);
let selcount = selwid.length;
let extruders = settings.device.extruders;
if (selcount) {
UI.nozzle.classList.add('lt-active');
UI.trash.style.display = 'flex';
if (feature.meta && selcount === 1) {
let sel = selection.widgets()[0];
let sel = selwid[0];
let name = sel.meta.file || sel.meta.url;
if (name) {
name = name