Fix for issue #265

ensure that editor switching does not produce dirty editors.