From 83bbf16768add3a2efd361e3afb9e4aa9f46e756 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 7 Dec 2021 18:28:49 -0500 Subject: [PATCH] skip catalog for grouped objects --- src/kiri/init.js | 20 +++++--------------- src/kiri/widget.js | 4 ++++ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/kiri/init.js b/src/kiri/init.js index 796786cc..73a15bf8 100644 --- a/src/kiri/init.js +++ b/src/kiri/init.js @@ -1335,22 +1335,12 @@ return API.platform.load_files(files, undefined); } - function ck_group() { - if (files.length === 1) { - API.platform.load_files(files); - } else { - UC.confirm(`group ${files.length} files?`).then(yes => { - API.platform.load_files(files, yes ? [] : undefined); - }); - } - } - - if (files.length > 5) { - UC.confirm(`add ${files.length} objects to workspace?`).then(yes => { - if (yes) ck_group(); - }); + if (files.length === 1) { + API.platform.load_files(files); } else { - ck_group(); + UC.confirm(`group ${files.length} files?`).then(yes => { + API.platform.load_files(files, yes ? [] : undefined); + }); } } diff --git a/src/kiri/widget.js b/src/kiri/widget.js index 35e4d3c5..d059d3fd 100644 --- a/src/kiri/widget.js +++ b/src/kiri/widget.js @@ -139,6 +139,7 @@ console.log/** Copyright Stewart Allen -- All Rights Reserved */ */ function Widget(id, group) { this.id = id || new Date().getTime().toString(36)+(nextId++); + this.grouped = group ? true : false; this.group = group || []; this.group.push(this); if (!this.group.id) { @@ -249,6 +250,9 @@ console.log/** Copyright Stewart Allen -- All Rights Reserved */ ******************************************************************* */ PRO.saveToCatalog = function(filename) { + if (this.grouped) { + return this; + } let widget = this; let time = UTIL.time(); widget.meta.file = filename;