Skip to content
Snippets Groups Projects
Commit 8126b8c6 authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Fix issues with out of bounds issues.

Fix some other issues.


git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@8566 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent a640e712
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ if size(object.data.Grid2.cells,2) > 1 ...@@ -39,7 +39,7 @@ if size(object.data.Grid2.cells,2) > 1
end end
code = [code new_code]; code = [code new_code];
if size(object.data.Grid1.cells,2) > 1 if object.data.multi_mode == 0 && size(object.data.Grid1.cells,2) > 1
[new_code,new_queries] = CVC_checker.generate_cvc_grid(object.data.Grid1,size(queries,2)); [new_code,new_queries] = CVC_checker.generate_cvc_grid(object.data.Grid1,size(queries,2));
queries = [queries new_queries]; queries = [queries new_queries];
code = [code new_code]; code = [code new_code];
......
...@@ -17,11 +17,13 @@ for i = 1:size(grid.cells,2) ...@@ -17,11 +17,13 @@ for i = 1:size(grid.cells,2)
error = ''; error = '';
string = get(grid.cells(i).cond,'String'); string = get(grid.cells(i).cond,'String');
s = [string(1,:)]; if size(string) > 0
for j = 2:size(string,1) s = [string(1,:)];
s = [s ' ' string(j,:)]; for j = 2:size(string,1)
s = [s ' ' string(j,:)];
end
string = s;
end end
string = s;
if ( strcmp(string,'') || isempty(string)) && i == 1 && isempty(grid.parent_grid) && size(grid.cells,2) == 1 if ( strcmp(string,'') || isempty(string)) && i == 1 && isempty(grid.parent_grid) && size(grid.cells,2) == 1
break; break;
......
...@@ -24,11 +24,13 @@ for i=1:size(grid.cells,2) ...@@ -24,11 +24,13 @@ for i=1:size(grid.cells,2)
end end
text = char(grid.cells(i).cond_text); text = char(grid.cells(i).cond_text);
s = [text(1,:)]; if size(text) > 0
for j = 2:size(text,1) s = [text(1,:)];
s = [s ' ' text(j,:)]; for j = 2:size(text,1)
s = [s ' ' text(j,:)];
end
text = s;
end end
text = s;
vars = regexp(text,'([a-zA-Z][a-zA-Z0-9_]*)','match'); vars = regexp(text,'([a-zA-Z][a-zA-Z0-9_]*)','match');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment