skip catalog for grouped objects
This commit is contained in:
parent
068002076c
commit
83bbf16768
2 changed files with 9 additions and 15 deletions
|
|
@ -1335,22 +1335,12 @@
|
||||||
return API.platform.load_files(files, undefined);
|
return API.platform.load_files(files, undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ck_group() {
|
if (files.length === 1) {
|
||||||
if (files.length === 1) {
|
API.platform.load_files(files);
|
||||||
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();
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
ck_group();
|
UC.confirm(`group ${files.length} files?`).then(yes => {
|
||||||
|
API.platform.load_files(files, yes ? [] : undefined);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
*/
|
*/
|
||||||
function Widget(id, group) {
|
function Widget(id, group) {
|
||||||
this.id = id || new Date().getTime().toString(36)+(nextId++);
|
this.id = id || new Date().getTime().toString(36)+(nextId++);
|
||||||
|
this.grouped = group ? true : false;
|
||||||
this.group = group || [];
|
this.group = group || [];
|
||||||
this.group.push(this);
|
this.group.push(this);
|
||||||
if (!this.group.id) {
|
if (!this.group.id) {
|
||||||
|
|
@ -249,6 +250,9 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
******************************************************************* */
|
******************************************************************* */
|
||||||
|
|
||||||
PRO.saveToCatalog = function(filename) {
|
PRO.saveToCatalog = function(filename) {
|
||||||
|
if (this.grouped) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
let widget = this;
|
let widget = this;
|
||||||
let time = UTIL.time();
|
let time = UTIL.time();
|
||||||
widget.meta.file = filename;
|
widget.meta.file = filename;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue