Changed code to save layer style when editing.