enable deck removal undo again

This commit is contained in:
Damien Elmes 2021-03-11 22:24:12 +10:00
parent 71789eb51a
commit 0ab87b7339

View File

@ -468,7 +468,7 @@ impl Collection {
pub fn remove_decks_and_child_decks(&mut self, dids: &[DeckID]) -> Result<usize> { pub fn remove_decks_and_child_decks(&mut self, dids: &[DeckID]) -> Result<usize> {
let mut card_count = 0; let mut card_count = 0;
self.transact(None, |col| { self.transact(Some(UndoableOpKind::RemoveDeck), |col| {
let usn = col.usn()?; let usn = col.usn()?;
for did in dids { for did in dids {
if let Some(deck) = col.storage.get_deck(*did)? { if let Some(deck) = col.storage.get_deck(*did)? {