diff options
| author | Nathan Dinsmore <queryselector@gmail.com> | 2013-04-19 10:51:43 -0400 |
|---|---|---|
| committer | Nathan Dinsmore <queryselector@gmail.com> | 2013-04-19 10:51:43 -0400 |
| commit | 9661cc781ed4fa2410a20320e4808517df1a79e9 (patch) | |
| tree | 4f46fffa4ae0677439f990033431a04dde3d021f | |
| parent | 7681525cc2f3f900136d745dc95594b3a731dcd1 (diff) | |
| download | snap-9661cc781ed4fa2410a20320e4808517df1a79e9.tar.gz snap-9661cc781ed4fa2410a20320e4808517df1a79e9.zip | |
Fixed #55
Creating a variable which already exists no longer performs any action.
| -rw-r--r-- | objects.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1675,7 +1675,7 @@ SpriteMorph.prototype.blockTemplates = function (category) { new VariableDialogMorph( null, function (pair) { - if (pair) { + if (pair && !myself.variables.silentFind(pair[0])) { myself.addVariable(pair[0], pair[1]); myself.toggleVariableWatcher(pair[0], pair[1]); myself.blocksCache[cat] = null; @@ -3796,7 +3796,7 @@ StageMorph.prototype.blockTemplates = function (category) { new VariableDialogMorph( null, function (pair) { - if (pair) { + if (pair && !myself.variables.silentFind(pair[0])) { myself.addVariable(pair[0], pair[1]); myself.toggleVariableWatcher(pair[0], pair[1]); myself.blocksCache[cat] = null; |
