mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 21:21:06 -05:00
Fixed getter blocks not resizing when renaming variable
This commit is contained in:
parent
f07abb9b2a
commit
6b9998aa29
1 changed files with 6 additions and 2 deletions
|
@ -612,8 +612,12 @@ public class ScratchRuntime {
|
|||
private function updateVarRefs(oldName:String, newName:String, owner:ScratchObj):void {
|
||||
// Change the variable name in all blocks that use it.
|
||||
for each (var b:Block in allUsesOfVariable(oldName, owner)) {
|
||||
if (b.op == Specs.GET_VAR) b.setSpec(newName);
|
||||
else b.args[0].setArgValue(newName);
|
||||
if (b.op == Specs.GET_VAR) {
|
||||
b.setSpec(newName);
|
||||
b.fixExpressionLayout();
|
||||
} else {
|
||||
b.args[0].setArgValue(newName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue