Skip to content

Commit 9ead1a1

Browse files
committed
Alert user when overwriting composite
1 parent d548754 commit 9ead1a1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

js/widgets/settings_table.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,12 @@ $(function() {
488488
ids.push(id);
489489

490490
if (id in individual_composites) {
491-
widg.xmin = Math.min(widg.xmin, individual_composites[id].xmin);
492-
widg.xmax = Math.max(widg.xmax, individual_composites[id].xmax);
493-
resolve()
491+
if (!confirm("Composite " + id + " already exists. Overwrite?")) {
492+
reject("Composite " + id + " already exists")
493+
}
494+
// widg.xmin = Math.min(widg.xmin, individual_composites[id].xmin);
495+
// widg.xmax = Math.max(widg.xmax, individual_composites[id].xmax);
496+
// resolve()
494497
};
495498

496499
$("#metadata-table").metadata_table("add_id", widg.options.idx, id);

0 commit comments

Comments
 (0)