fix(raw): fix RAW preview matching, EXIF orientation alignment & studio initial state

This commit is contained in:
2026-10-06 12:23:38 +07:00
parent 23f534ffb8
commit 2e1feb195a
6 changed files with 333 additions and 31 deletions
+6 -9
View File
@@ -578,11 +578,9 @@ export function Workspace() {
}, []);
const defaultLook = useCallback((): Look => {
const provia = FILM_SIMS.find((f) => f.id === 'sim-provia');
const cur = lookRef.current?.recipe ?? DEFAULT_RECIPES[0];
return {
recipe: { ...(provia ? filmSimToRecipe(provia) : cur), id: cur.id, name: cur.name, isCustom: true },
simId: provia ? provia.id : null,
recipe: { ...BASE_RECIPE, id: 'web-current', name: 'BASE', isCustom: true },
simId: null,
frameId: 'none',
crop: 'none',
cropRect: DEFAULT_CROP_RECT,
@@ -1054,10 +1052,9 @@ export function Workspace() {
setPreviewBytes(preview);
setGps(found);
setIso(foundIso);
// A new photo starts a new history whose floor is the default look, so
// UNDO walks all the way back and still leaves the photo loaded. REDO has
// nothing to walk forward onto in a history that just began.
setUndo([defaultLook()]);
const def = defaultLook();
restoreLook(def);
setUndo([def]);
setRedo([]);
if (keepGeo) return;
setUseGeotag(!!found);
@@ -1068,7 +1065,7 @@ export function Workspace() {
// location prompt.
if (!found && pro && canLocate && !locDeniedRef.current) locateMe(taken);
},
[defaultLook, pro, locateMe]
[defaultLook, restoreLook, pro, locateMe]
);
// A shot, from the live viewfinder into the studio. The recipe is already in