Revert "Merge pull request #779 from paulkaplan/fix-multi-refresh"
This reverts commit5b9e8aa0f0, reversing changes made to4cb65dc50c.
This commit is contained in:
1 parent
cac1cc95e4
commit
c8f04c0938
1 file changed
+3
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user