mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
call allUsedVariables in addTopBlock
This commit is contained in:
parent
2364aed716
commit
3f0b2961a1
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ Blockly.Workspace.SCAN_ANGLE = 3;
|
|||
Blockly.Workspace.prototype.addTopBlock = function(block) {
|
||||
this.topBlocks_.push(block);
|
||||
if (this.isFlyout) {
|
||||
var variables = Blockly.Variables.allVariables(block);
|
||||
var variables = Blockly.Variables.allUsedVariables(block);
|
||||
for (var i = 0; i < variables.length; i++) {
|
||||
if (this.variableList.indexOf(variables[i]) == -1) {
|
||||
this.variableList.push(variables[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue