void ApiHandler::IpcEditorStartChange(EditorCtrl& editor, IConnection& conn) { const int editorId = editor.GetId(); // Only allow one level of change grouping boost::ptr_map<IConnection*,ConnectionState>::iterator p = m_connStates.find(&conn); if (p == m_connStates.end()) { IConnection* c = &conn; m_connStates.insert(c, new ConnectionState); p = m_connStates.find(&conn); } else { const set<int>& editorsInChange = p->second->editorsInChange; if (editorsInChange.find(editorId) != editorsInChange.end()) return; } p->second->editorsInChange.insert(editorId); editor.StartChange(); }