Fixed updateToolbox not properly updating flyouts. (#2332)

This commit is contained in:
Beka Westberg
2019-03-19 15:48:52 -07:00
committed by RoboErikG
parent 7fb7eb9a4d
commit e947471215

View File

@@ -1574,8 +1574,10 @@ Blockly.WorkspaceSvg.prototype.updateToolbox = function(tree) {
throw Error('Existing toolbox has no categories. Can\'t change mode.');
}
this.options.languageTree = tree;
this.toolbox_.populate_(tree);
var openNode = this.toolbox_.populate_(tree);
this.toolbox_.addColour_();
this.toolbox_.position();
this.toolbox_.tree_.setSelectedItem(openNode);
} else {
if (!this.flyout_) {
throw Error('Existing toolbox has categories. Can\'t change mode.');