mapgears / scribeui

http://scribeui.org
MIT License
27 stars 15 forks source link

CTRL-z on layer groups may result in loss the the group #7

Closed jlap closed 11 years ago

jlap commented 11 years ago

I made a fiddle to demonstrate that this is not a codemirror bug: http://jsfiddle.net/RUA9h/ In this example, the code editors both behave normally.

That make me realize why the error was occurring. The groupEditor's value is changed when the user selects a group. That is why the error is not happening in the secondary panel, variables, map etc each have their own editor.

Permanent solution would be to have each group have their own editor.

A quick hack fix would be to clear the history whenever a new group is selected.

jlap commented 11 years ago

Fixed in f376c503967fc5c644beb0bc3960eaa2579181db

Decided to clear codemirror's history, the alternative seemed too complex.