expression = "";
} else {
expression = "=" + expression;
- }
+ }
+ //Don't update if the expression hasn't changed
if (expression.equals(str))
return;
if (str.startsWith("=")) {
editor.edit(null, SpreadsheetUtils.cellName(row, column), ClientModel.CONTENT_EXPRESSION, str, Bindings.STRING, null);
+ //Update cell expression
+ clientModel.setProperty(cellName, ClientModel.CONTENT_EXPRESSION, str);
} else {
editor.edit(null, SpreadsheetUtils.cellName(row, column), Variant.ofInstance(str), null);
+ //Update cell expression
+ clientModel.setProperty(cellName, ClientModel.CONTENT_EXPRESSION, null); //If not an expression, then the expression property is null
}
}