only add non-empty loops. add simple to top on legacy/support path. fix invalid healed report

This commit is contained in:
Stewart Allen 2021-09-16 10:39:04 -10:00
commit 69eb0356a9
4 changed files with 12 additions and 3 deletions

View file

@ -870,7 +870,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
setTimeout(() => {
Promise.all(widgets.map(w => w.heal())).then(mod => {
API.hide.alert(marker);
let healed = mod.map(m => m).length;
let healed = mod.filter(m => m).length;
if (healed) {
API.show.alert(`${healed} Object${healed ? 's':''} healed`);
} else {

View file

@ -184,6 +184,7 @@
// standard legacy polygon
let top = new Top(poly);
this.tops.push(top);
top.simple = poly;
return top;
} else {
// frop top object passed back by slicePost()

View file

@ -346,6 +346,8 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
if (data.vertices) {
this.loadVertices(data.vertices);
this.modified = true;
} else {
this.modified = false;
}
resolve(this.modified);
});