Skip to content
Snippets Groups Projects
Commit bbbbcf43 authored by DD's avatar DD
Browse files

add comment

parent abb5d5b7
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment