Keep the dialled-in look when swapping film simulations
This commit is contained in:
@@ -402,6 +402,19 @@ export default function App() {
|
||||
// never flip the watermark on/off.
|
||||
};
|
||||
|
||||
// Picking a film sim swaps the look only: everything the user dialled in on
|
||||
// the LIGHT/WB/FX tabs and the frame they picked stay exactly as they are.
|
||||
// A saved recipe still loads its own stored values (that is what saving it
|
||||
// was for). Same trick as the session restore below: set the recipe without
|
||||
// applyRecipe, which would snap the sliders back to the sim's canonical set.
|
||||
const handleSelectRecipe = (recipe: Recipe) => {
|
||||
if (!FILM_SIMS.some((s) => s.id === recipe.id)) {
|
||||
applyRecipe(recipe);
|
||||
return;
|
||||
}
|
||||
setSelectedRecipe({ ...recipe, adjustments, frameId: selectedFrame });
|
||||
};
|
||||
|
||||
// The recipe exactly as the user picked it. `selectedRecipe` is NOT a safe
|
||||
// copy of it: every slider move rewrites its `adjustments` in place
|
||||
// (handleUpdateAdjustments), so the canonical values only survive in the
|
||||
@@ -1084,7 +1097,7 @@ export default function App() {
|
||||
onOpenParamChange={setOpenParamKey}
|
||||
currentBaseFilter={selectedRecipe?.baseFilter}
|
||||
onCreateRecipe={handleCreateRecipe}
|
||||
onSelectRecipe={applyRecipe}
|
||||
onSelectRecipe={handleSelectRecipe}
|
||||
onUpdateAdjustments={handleUpdateAdjustments}
|
||||
onUpdateFrame={handleUpdateFrame}
|
||||
onToggleGeotag={handleToggleGeotag}
|
||||
|
||||
Reference in New Issue
Block a user