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=98ef90231fc6be36999667b377ad46fe1cd5b516;hb=9a37dabc6c0212ed3e14499c88df3208cd06f9b0;hp=1439a941dcb53d5a023d894a4615cb8924d469d0;hpb=1251d640abb698a4018ef1ea212f8cdf78befaaf;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..98ef90231 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 @@ -200,7 +200,7 @@ public class All { SpreadsheetCell sc = book.get(sheet.getName(graph), r.startRow, r.startColumn); sc.setContent(value); // book.accept(new InvalidateAll()); - List changed = book.invalidate(sc); +// List changed = book.invalidate(sc); //Invalidation handled by SpreadsheetNodeManager realm.asyncExec(new Runnable() { @Override @@ -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