From 5082e552cd026d609a7eb52d35df009c6f7887cb Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 26 Feb 2020 20:23:32 -0500 Subject: [PATCH] fix seeding in framed settings --- js/kiri.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/js/kiri.js b/js/kiri.js index 61fcce7a..8562a33d 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -2022,7 +2022,7 @@ self.kiri.license = exports.LICENSE; for (var i=0; i 0, + israw = lower.indexOf(".raw") > 0 || lower.indexOf('.') < 0, isstl = lower.indexOf(".stl") > 0, issvg = lower.indexOf(".svg") > 0, isgcode = lower.indexOf(".gcode") > 0 || lower.indexOf(".nc") > 0; @@ -3820,17 +3820,19 @@ self.kiri.license = exports.LICENSE; function checkSeed(ondone) { // skip sample object load in onshape (or any script postload) - if (!SDB[SEED] && !SETUP.s) { - loadSTL("/obj/cube.stl", function(vert) { - CATALOG.putFile("sample cube.stl", vert); - SDB[SEED] = new Date().getTime(); - platformComputeMaxZ(); - SPACE.view.home(); - setTimeout(saveWorkspace,500); - ondone(); - showHelpLocal(); - }); - return true; + if (!SDB[SEED]) { + SDB[SEED] = new Date().getTime(); + if (!SETUP.s) { + loadSTL("/obj/cube.stl", function(vert) { + CATALOG.putFile("sample cube.stl", vert); + platformComputeMaxZ(); + SPACE.view.home(); + setTimeout(saveWorkspace,500); + ondone(); + showHelpLocal(); + }); + return true; + } } return false; }