X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.spreadsheet.graph%2Fsrc%2Forg%2Fsimantics%2Fspreadsheet%2Fgraph%2Ffunction%2FAll.java;h=39e5778f9ddd5bfef7acee410973dc9f008f61df;hb=dfa52ccefe2e4c36965ad3ccf5e19b778cae0d99;hp=1439a941dcb53d5a023d894a4615cb8924d469d0;hpb=bfdceb3b5b0e4967358277cd506f237c9ee364c3;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/function/All.java b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/function/All.java index 1439a941d..39e5778f9 100644 --- a/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/function/All.java +++ b/bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/function/All.java @@ -620,20 +620,21 @@ public class All { private CellEditor getPossibleCellEditor(WriteGraph graph, String location, Variant value) throws DatabaseException { SpreadsheetResource SHEET = SpreadsheetResource.getInstance(graph); - Range range = SpreadsheetUtils.decodeCellAbsolute(location); - - List cells = SpreadsheetGraphUtils.possibleConfigurationCellVariables(graph, sheet, range); - if (cells.isEmpty()) { - if (value == null) { - return null; - } else { - cells = SpreadsheetGraphUtils.getOrCreateConfigurationCellVariables(graph, sheet, range); - } - } - if (cells.size() != 1) - throw new DatabaseException("Can edit only one cell at a time!"); - - return cells.iterator().next().getPropertyValue(graph, SHEET.cellEditor); + Range range = SpreadsheetUtils.decodePossibleCellAbsolute(location); + if(range == null) return null; //No editor found + + List cells = SpreadsheetGraphUtils.possibleConfigurationCellVariables(graph, sheet, range); + if (cells.isEmpty()) { + if (value == null) { + return null; + } else { + cells = SpreadsheetGraphUtils.getOrCreateConfigurationCellVariables(graph, sheet, range); + } + } + if (cells.size() != 1) + throw new DatabaseException("Can edit only one cell at a time!"); + + return cells.iterator().next().getPropertyValue(graph, SHEET.cellEditor); } @Override