diff options
| author | hallgren <hallgren@chalmers.se> | 2012-10-03 13:54:35 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-10-03 13:54:35 +0000 |
| commit | ec9dc23f466499fa4c77f14553b2cb1d03ce0e82 (patch) | |
| tree | 6cc56a119d3d9655cb008bed7e20da6e861b9376 /src/www | |
| parent | 3582ae6e085fcc2cfa2e0457c5674e22c5980fa5 (diff) | |
gfse: fix a bug caused by sharing when copying a linearization function in the row view
Functional programming is easier than imperative programming!
Diffstat (limited to 'src/www')
| -rw-r--r-- | src/www/gfse/editor.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js index 703886ab5..c33f0bfa4 100644 --- a/src/www/gfse/editor.js +++ b/src/www/gfse/editor.js @@ -1486,7 +1486,9 @@ function draw_row(g) { for(var i in missing) { var ci=missing[i] var conc=g.concretes[ci] - conc.lins.push(lin) + // This is not functional programming, so copy the lin first... + var lin2=JSON.parse(JSON.stringify(lin)) + conc.lins.push(lin2) timestamp(conc); } reload_grammar(g) |
