add comment

This commit is contained in:
DD committed 2017-11-16 17:07:05 -05:00
1 parent abb5d5b7ae
commit bbbbcf4369
1 file changed
+2
+2
View File
@@ -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);