feat(panel): editor keeps the values when the sim changes; one-tap RESET back to the look

This commit is contained in:
2026-09-10 22:06:36 +07:00
parent 868ebfe6e2
commit 02bc3aa4da
3 changed files with 61 additions and 17 deletions
+4 -1
View File
@@ -228,9 +228,12 @@ export default function RecipeCreateModal({
setIso(null);
}, [visible, currentBase, initial]);
// Switching the simulation reloads its standard values into the form.
// Switching the simulation reloads its standard values into the form — not
// in the editor though: there the numbers on screen are the user's own, and
// swapping the base look under them must not throw them away.
const selectSim = (b: BaseFilter) => {
setSim(b);
if (initial) return;
const v = valuesOf(b);
setDr(v.dr);
setGrain(v.grain);