private void render_LeftClick(object sender, MouseButtonEventArgs e) { if (RenderIsDragging) { return; } var result = render.GetOBJ(sender, e); if (result == null) { return; } if ((ModifierKeys & Keys.Shift) == Keys.Shift && CurList.Contains(result)) { ObjectsListBox.SelectedIndices.Add(CurList.IndexOf(result)); } else { ObjList list = null; if (EditingList) { list = CurList.Contains(result) ? CurList : null; } else { list = LoadedLevel.FindListByObj(result); } if (list != null) { CurListName = list.name; ObjectsListBox.ClearSelected(); ObjectsListBox.SelectedIndex = list.IndexOf(result); } } }
public void InternalDeleteObj(LevelObj o, ObjList list) { ObjectsListBox.SelectedIndex = -1; if (list == CurList) { ObjectsListBox.Items.RemoveAt(CurList.IndexOf(o)); render.RemoveModel(o); } list.Remove(o); }