Skip to content
Snippets Groups Projects
Commit c8f04c09 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Revert "Merge pull request #779 from paulkaplan/fix-multi-refresh"

This reverts commit 5b9e8aa0, reversing
changes made to 4cb65dc5.
parent cac1cc95
No related branches found
No related tags found
No related merge requests found
......@@ -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];
......
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