feat(panel): editor keeps the values when the sim changes; one-tap RESET back to the look
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user