Detect max cell index on load, just in case the max cell index we've stored previously was out of whack.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@341 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
f8d30e9e8e
commit
2846d66261
@ -178,6 +178,7 @@ public class Project {
|
||||
/* String version = */ reader.readLine();
|
||||
|
||||
Project project = new Project(id);
|
||||
int maxCellCount = 0;
|
||||
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
@ -195,11 +196,15 @@ public class Project {
|
||||
int count = Integer.parseInt(value);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
project.rows.add(Row.load(reader.readLine()));
|
||||
Row row = Row.load(reader.readLine());
|
||||
project.rows.add(row);
|
||||
|
||||
maxCellCount = Math.max(maxCellCount, row.cells.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.columnModel.setMaxCellIndex(maxCellCount - 1);
|
||||
project.recomputeRowContextDependencies();
|
||||
|
||||
return project;
|
||||
|
Loading…
Reference in New Issue
Block a user