render only new toolbox xmls

This commit is contained in:
Michael "Z" Goddard committed 2019-03-21 14:57:22 -04:00
1 parent 6d5183f99d
commit 656e8c2c77
1 file changed
+5 -2
+5 -2
View File
@@ -199,8 +199,11 @@ class Blocks extends React.Component {
const categoryId = this.workspace.toolbox_.getSelectedCategoryId();
const offset = this.workspace.toolbox_.getCategoryScrollOffset();
this.workspace.updateToolbox(this.props.toolboxXML);
this._renderedToolboxXML = this.props.toolboxXML;
if (this._renderedToolboxXML !== this.props.toolboxXML) {
this.workspace.updateToolbox(this.props.toolboxXML);
this._renderedToolboxXML = this.props.toolboxXML;
}
// In order to catch any changes that mutate the toolbox during "normal runtime"
// (variable changes/etc), re-enable toolbox refresh.