cmd+Z on accident. way to recover?

I accidentally pressed command Z on image occlusion and it said it reverted to something and removed all of the other cards I was making during this one session. is there a way to revert it and get those cards back?

The images will still be in your media folder, but the cards will need to be added again I’m afraid.

@glutanimate perhaps the add-on is not calling col.autosave() like the add cards screen does?

@dae hmm, IO doesn’t call col.autosave(), but it does set a checkpoint using mw.checkpoint() ahead of creating its notes, which should call down the line. Still, could that be a point for concern?

FWIW, I’ve just tried replicating this throughout the following scenarios…:

  • create notes using AddCards, create IO note, undo
  • create IO note, create notes using AddCards, undo
  • switch back and forth between AddCards and IO, creating notes, undo

…but haven’t been able to replicate this, yet. Undoing adding a note via AddCards also straight-up doesn’t work for me on vanilla 2.1.42 (has that always been the case?).

IO itself doesn’t have Ctrl+Z bound to mw.undo, either – it reverts actions within the mask editor. However, you can use Ctrl+Z to revert added notes via the checkpoint if mw is focused.

@glutanimate Thanks for elaborating; that sounds like it would be saving after every note. I don’t think we supported undoing from the add screen, as there’s a history button you can use to access the recently added material.

@nakul1999 It sounds like you shouldn’t have lost more than 1 card when undoing. Have you tried searching for the cards in the browse screen? Can you reproduce the problem after disabling add-ons, and testing with the latest Anki version?

1 Like

I’ll be honest. I’m quite new to Anki but I did look through ‘Browse cards’ and they weren’t there. Maybe they were in that history thing you said but I hadn’t checked. Might run a few tests on a diff profile and try it out/ try without addons. I’m on Anki 2.1.38 so not technically the latest version @dae @glutanimate