Fix for issue #265
Fix for issue #265

ensure that editor switching does not produce dirty editors.

scripted-editor/scripted,kyawzinsoe/scripted,sirspock/scripted_token,scripted-editor/scripted,kyawzinsoe/scripted,scripted-editor/scripted,kyawzinsoe/scripted,sirspock/scripted_token