Undo & Redo
One history for everything you do: crops, auto-crop batches, marks, develop, metadata and copies.
0:48Cmd+Z (Edit → Undo) takes back the last thing you did, whatever it was and whichever pictures it touched. Cmd+Shift+Z (Edit → Redo) does it again. It works in every view, and the menu says what it would undo: Undo Auto Crop (12 pictures).
What one step is#
- One key, menu item, click or API call is one step: Remove Crops on 200 selected pictures is one Cmd+Z.
- A batch is one step from its start to its end: auto-crop of a whole folder comes back with one undo, also when you rated pictures while it ran (those are steps of their own).
- A slider dragged and let go is one step.
What it takes back#
Everything that is saved for a picture:
- stars, flags, colour labels, tags and masks;
- crops, auto-crops and straightening;
- rotation of a RAW (it is stored in the sidecar);
- develop settings, presets, pasted settings, Auto Tone and Auto White Balance;
- virtual copies made or deleted;
- keywords, caption and the other IPTC fields, the position and the capture time.
And what is done to the files:
- Move to Trash, in the window and in Library → Disks & Duplicates: undo puts the pictures back where they were, with their sidecars and voice notes, and back in the albums they were in.
- moving pictures to another folder, a batch rename and a quarantine of rejects: the files go back to where they were, under their old names. Files a move overwrote went to the Trash, so they come back too.
- renaming or moving a folder, also to another disk (it is copied back the same way, in the background);
- putting pictures in an album and taking them out;
- a folder moved to the Trash;
- a JPEG turned or mirrored in place, trimmed, its DPI set, or metadata stripped from it or its sidecar: the file comes back byte for byte as it was, not turned back (a turn of a JPEG whose size is not a whole number of blocks loses its edge, and a turn back would not give it back);
- a keyword renamed, merged, moved or deleted over the whole library: the keyword list and every picture's keywords, also the pictures that are not open. Undo in the library's Keywords section is the same undo.
Putting quarantined pictures back is Edit → Undo, which then reads "Undo Quarantine".
The history follows a picture you move or rename, and it lasts until you quit the app. A file rewritten in place is kept as it was while its step is in the history (a hard link where it can be, so it takes no room until the file is written again), and the kept versions go when you quit. The History list in the develop panel stays as it was: it is each picture's own develop history, kept with the folder.
A picture changed since#
If something else changed a picture after you did (Lightroom wrote its sidecar, or you edited the file in another program), or a file is no longer where the step left it, or something else now has its name, undo leaves that picture as it is rather than writing over the newer change, and says so: Undid Auto Crop (12 pictures); one picture was changed since by something else, and was left as it is.
From the API#
| Route | What it does |
|---|---|
GET /api/undo |
What Undo and Redo would do now, as the menu says it |
POST /api/undo |
Undo the last step |
POST /api/redo |
Redo the last undone step |
The SDK has client.history(), client.undo() and client.redo(). The older POST /api/images/current/develop/undo and /redo do the same as /api/undo and /api/redo.