mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Update block xml for all blocks that use a variable that was just renamed.
This commit is contained in:
parent
90e9e1c0b0
commit
784341909b
2 changed files with 31 additions and 0 deletions
|
@ -319,6 +319,10 @@ class Blocks {
|
|||
break;
|
||||
case 'var_rename':
|
||||
stage.renameVariable(e.varId, e.newName);
|
||||
// Update all the blocks that use the renamed variable.
|
||||
if (optRuntime) {
|
||||
optRuntime.updateBlocksAfterVarRename(e.varId, e.newName);
|
||||
}
|
||||
break;
|
||||
case 'var_delete':
|
||||
stage.deleteVariable(e.varId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue