Merge pull request from fsih/refreshWorkspace

Add ability to refresh workspace for current editing target
This commit is contained in:
DD Liu 2017-06-15 16:40:14 -04:00 committed by GitHub
commit b9aefa780f

View file

@ -469,6 +469,17 @@ class VirtualMachine extends EventEmitter {
}
}
/**
* Repopulate the workspace with the blocks of the current editingTarget. This
* allows us to get around bugs like gui#413.
*/
refreshWorkspace () {
if (this.editingTarget) {
this.emitWorkspaceUpdate();
this.runtime.setEditingTarget(this.editingTarget);
}
}
/**
* Emit metadata about available targets.
* An editor UI could use this to display a list of targets and show