X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.spreadsheet.ui%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fui%2FTextTableCellEditor.java;h=2c84b6ad1d16abc8662e052c67f4bd9f2c394ed6;hb=refs%2Fchanges%2F33%2F1933%2F2;hp=b9920415ff31c3b7ef2357633275e60dc439f967;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/TextTableCellEditor.java b/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/TextTableCellEditor.java index b9920415f..2c84b6ad1 100644 --- a/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/TextTableCellEditor.java +++ b/bundles/org.simantics.spreadsheet.ui/src/org/simantics/spreadsheet/ui/TextTableCellEditor.java @@ -145,14 +145,19 @@ class TextTableCellEditor extends DefaultCellEditor implements SpreadsheetCellEd 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 } }