diff options
Autocommit at 29.05.2022 @ 14:30
1 files changed, 4 insertions, 3 deletions
| -rw-r--r-- | src/Models/CellFormula.cpp | 7 |
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index 5252e30..b85d790 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -87,10 +87,11 @@ void CellFormula::parseAndSetValue(const char* str) { } if (currOp == '-') { - currOp = '+'; - formula.add({new CellDouble(-1.0), '*'}); + formula.add({cellToAdd, '+'}); + localCells.add(CellDouble(-1.0)); + formula.add({&localCells[localCells.get_count() - 1], '*'}); } - formula.add({cellToAdd, currOp}); + else formula.add({cellToAdd, currOp}); } } |
