From 99ebefa1bfc68288479991d052993e2c9d1d351e Mon Sep 17 00:00:00 2001 From: RoboErikG Date: Mon, 16 Jul 2018 10:18:40 -0700 Subject: [PATCH] Revert "Fix #1960 by collecting block info before icons are destroyed" (#1973) * Revert "Localisation updates from https://translatewiki.net." This reverts commit c4a0b649453ebf4e14dfa7b8a0c9a2c83cb22366. * Revert "Fix #1960 by collecting block info before icons are destroyed (#1970)" This reverts commit 9a3bd45b22437fa87499f245b677ab675d2a2ce4. --- core/block_svg.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/core/block_svg.js b/core/block_svg.js index 2638466c7..b95504cba 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -837,27 +837,16 @@ Blockly.BlockSvg.prototype.dispose = function(healStack, animate) { this.warningTextDb_ = null; } - // If the block is rendered we need to record the event before disposing of - // the icons to prevent losing information. - // TODO (#1969): Remove event generation/firing once comments are fixed. - var deleteEvent; - if (Blockly.Events.isEnabled()) { - deleteEvent = new Blockly.Events.BlockDelete(this); - } Blockly.Events.disable(); try { var icons = this.getIcons(); for (var i = 0; i < icons.length; i++) { icons[i].dispose(); } - // TODO (#1969): Move out of disable block once comments are fixed. - Blockly.BlockSvg.superClass_.dispose.call(this, healStack); } finally { Blockly.Events.enable(); } - if (Blockly.Events.isEnabled() && deleteEvent) { - Blockly.Events.fire(deleteEvent); - } + Blockly.BlockSvg.superClass_.dispose.call(this, healStack); this.svgGroup_.parentNode.removeChild(this.svgGroup_); blockWorkspace.resizeContents();