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

Remove manual refresh for scratch-blocks workspace

parent 992bdcec
No related branches found
No related tags found
No related merge requests found
......@@ -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];
......
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