/// ------------------------------------------------------------------------------------ /// <summary> /// Updates the book filter to show only the specified books and create an undo action /// for the change. /// </summary> /// <param name="newFilterList">The new list of books to show in the filter.</param> /// <returns>A new undo action that can be used to undo/redo this change to the /// filter</returns> /// ------------------------------------------------------------------------------------ public IUndoAction UpdateFilterAndCreateUndoAction(params IScrBook[] newFilterList) { if (newFilterList.Length == 0 && m_scr.ScriptureBooksOS.Count > 0) { newFilterList = m_scr.ScriptureBooksOS.ToArray(); } UpdateBookFilterAction undoAction = new UpdateBookFilterAction(this, newFilterList); FilteredBooks = newFilterList; return(undoAction); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Updates the book filter to show only the specified books and create an undo action /// for the change. /// </summary> /// <param name="newFilterList">The new list of books to show in the filter.</param> /// <returns>A new undo action that can be used to undo/redo this change to the /// filter</returns> /// ------------------------------------------------------------------------------------ public IUndoAction UpdateFilterAndCreateUndoAction(params IScrBook[] newFilterList) { if (newFilterList.Length == 0 && m_scr.ScriptureBooksOS.Count > 0) newFilterList = m_scr.ScriptureBooksOS.ToArray(); UpdateBookFilterAction undoAction = new UpdateBookFilterAction(this, newFilterList); FilteredBooks = newFilterList; return undoAction; }