void HandleParentChanged(IBrowsableCollection collection) { IPhoto [] local = old; selected_cells.Clear(); bit_array = new BitArray(parent.Count); ClearCached(); if (old != null) { int i; for (i = 0; i < local.Length; i++) { int parent_index = parent.IndexOf(local [i]); if (parent_index >= 0) { Add(parent_index, false); } } } // Call the directly so that we don't reset old immediately this way the old selection // set isn't actually lost until we change it. Changed?.Invoke(this); DetailedChanged?.Invoke(this, null); }
public void SignalChange(int [] ids) { ClearCached(); old = Items.ToArray(); Changed?.Invoke(this); DetailedChanged?.Invoke(this, ids); }