private void PrepareForEditing() { // If we're currently displaying script which belongs to a type we inherit from, // we must clone the script before we can edit it. if (!IsScriptFromInheritedType()) { return; } m_controller.StartTransaction(string.Format("Copy {0} script to {1}", m_helper.ControlDefinition.Attribute, m_data.Name)); m_scripts = m_scripts.Clone(m_data.Name, m_helper.ControlDefinition.Attribute); m_controller.EndTransaction(); RefreshScriptsList(); }