From c8f04c09383b82cd34dbf4d0ec40e6d455996776 Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Mon, 23 Oct 2017 09:08:50 -0400 Subject: [PATCH] Revert "Merge pull request #779 from paulkaplan/fix-multi-refresh" This reverts commit 5b9e8aa0f0e68736218165dc61050ff76c1651eb, reversing changes made to 4cb65dc50cb84def45c611fa53d515ee4a520e6c. --- src/containers/blocks.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index 01aea5af3..345d21e26 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -82,10 +82,12 @@ class Blocks extends React.Component { return; } // @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); } @@ -176,6 +178,7 @@ 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]; -- GitLab