Derived of derived is again root formula

This commit is contained in:
Álvaro González 2026-03-10 19:12:27 +01:00
parent 2f8da74bee
commit 0c00158c92

View file

@ -472,13 +472,16 @@ class _FormulaScreenState extends State<FormulaScreen> {
} }
try { try {
// Create a DerivedFormula with this input variable as output late final FormulaInterface derivedFormula;
final derivedFormula = DerivedFormula( if( variable.name == rootFormula.output.name) {
outputName: variable.name, derivedFormula = rootFormula;
originalFormula: rootFormula }
); else {
derivedFormula = DerivedFormula(
outputName: variable.name,
originalFormula: rootFormula
);
}
// Replace the current FormulaScreen with the new DerivedFormula screen // Replace the current FormulaScreen with the new DerivedFormula screen
Navigator.pushReplacement( Navigator.pushReplacement(