From bbbbcf4369aa535afefd8b2b41366afb254460c1 Mon Sep 17 00:00:00 2001 From: DD <liudi08@gmail.com> Date: Thu, 16 Nov 2017 17:07:05 -0500 Subject: [PATCH] add comment --- src/containers/blocks.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index 6f8ce8177..f3e46dfaf 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -184,6 +184,8 @@ class Blocks extends React.Component { // Remove and reattach the workspace listener (but allow flyout events) this.workspace.removeChangeListener(this.props.vm.blockListener); const dom = this.ScratchBlocks.Xml.textToDom(data.xml); + // @todo This line rerenders toolbox, and the change in the toolbox XML also rerenders the toolbox. + // We should only rerender the toolbox once. See https://github.com/LLK/scratch-gui/issues/901 this.ScratchBlocks.Xml.clearWorkspaceAndLoadFromXml(dom, this.workspace); this.workspace.addChangeListener(this.props.vm.blockListener); -- GitLab