diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index 7a2a4d908f70d51656744fd9e6a218722ec6b91d..c8ffb1a79285759b311947a72eb25149cd37c898 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -85,12 +85,10 @@ class Blocks extends React.Component { } // @todo hack to resize blockly manually in case resize happened while hidden - // @todo hack to reload the workspace due to gui bug #413 if (this.props.isVisible) { // Scripts tab this.workspace.setVisible(true); this.props.vm.refreshWorkspace(); window.dispatchEvent(new Event('resize')); - this.workspace.toolbox_.refreshSelection(); } else { this.workspace.setVisible(false); } @@ -195,7 +193,6 @@ class Blocks extends React.Component { const dom = this.ScratchBlocks.Xml.textToDom(data.xml); this.ScratchBlocks.Xml.domToWorkspace(dom, this.workspace); this.ScratchBlocks.Events.enable(); - this.workspace.toolbox_.refreshSelection(); if (this.props.vm.editingTarget && this.state.workspaceMetrics[this.props.vm.editingTarget.id]) { const {scrollX, scrollY, scale} = this.state.workspaceMetrics[this.props.vm.editingTarget.id];