From e16f9e5c8fa2a76e7ddd557bd6a26e6686163418 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sun, 3 Jan 2021 01:14:07 -0600 Subject: [PATCH] Do not emit project change when creating the default project Wow this is a horrible hack --- src/engine/blocks.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/blocks.js b/src/engine/blocks.js index 2e31b6eb..8bef5895 100644 --- a/src/engine/blocks.js +++ b/src/engine/blocks.js @@ -535,7 +535,10 @@ class Blocks { currTarget.comments[e.commentId].y = e.xy.y; } } - this.emitProjectChanged(); + // tw: Ignore creation of default project comment + if (e.commentId !== 'UgZfouDT0`j;EW7Y3N2]') { + this.emitProjectChanged(); + } break; case 'comment_change': this.resetCache(); // tw: comments can affect compilation @@ -652,7 +655,10 @@ class Blocks { // A new block was actually added to the block container, // emit a project changed event - this.emitProjectChanged(); + // tw: Ignore creation of default project blocks + if (block.id !== 'Fj5[gB=S0qJiUu$/!nym' && block.id !== 'Z2l`f?]oj|=Nq/GH@G_u') { + this.emitProjectChanged(); + } } /**