private void OnDisable() { popupController.Hide(); inputMapper.SetEnableAll(true); if (entry != null) { entry.FinishModify(); if (entry.key.isNone) { controller.DeleteCompoundKey(entry.index); } else { int duplicatedIndex = -1; for (int i = 0; i < controller.currentCompoundKeys.Count; ++i) { // Assuming there can be at most one duplicated key if (i != entry.index && controller.currentCompoundKeys[i].Equals(entry.key)) { duplicatedIndex = i; break; } } if (duplicatedIndex >= 0) { controller.DeleteCompoundKey(entry.index); } else { controller.ResolveDuplicate(); entry.RefreshDisplay(); } } } entry = null; }
public void Delete() { controller.DeleteCompoundKey(index); }