Skip to content

Commit

Permalink
Merge pull request #808 from gforney/master
Browse files Browse the repository at this point in the history
correction to evacuation file loading
  • Loading branch information
gforney authored Mar 8, 2019
2 parents ef0f2ca + 0412677 commit 0e04aaf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
22 changes: 20 additions & 2 deletions Source/smokeview/menus.c
Original file line number Diff line number Diff line change
Expand Up @@ -3329,6 +3329,20 @@ void LoadEvacMenu(int value){
ReadPart(parti->file, i, UNLOAD, &errorcode);
}
npartframes_max=GetMinPartFrames(PARTFILE_LOADALL);
for(i = 0;i<npartinfo;i++){
partdata *parti;

parti = partinfo+i;
parti->finalize = 0;
}
for(i = npartinfo-1;i>=0;i--){
partdata *parti;

parti = partinfo+i;
if(parti->evac==0)continue;
parti->finalize = 1;
break;
}
for(i=0;i<npartinfo;i++){
partdata *parti;

Expand All @@ -3345,12 +3359,16 @@ void LoadEvacMenu(int value){
UpdateFrameNumber(0);
}
if(value>=0){
partdata *parti;

ReadEvacFile=1;
npartframes_max=GetMinPartFrames(value);
ReadPart(partinfo[value].file, value, LOAD, &errorcode);
parti = partinfo+value;
parti->finalize = 1;
ReadPart(parti->file, value, LOAD, &errorcode);
if(scriptoutstream!=NULL){
fprintf(scriptoutstream,"LOADFILE\n");
fprintf(scriptoutstream," %s\n",partinfo[value].file);
fprintf(scriptoutstream," %s\n",parti->file);
}
}
else if(value==MENU_EVAC_UNLOADALL){
Expand Down
5 changes: 4 additions & 1 deletion Source/smokeview/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,10 @@ int Smv2Html(char *html_in, char *html_file){

if(fgets(buffer, 255, stream_in)==NULL)break;
TrimBack(buffer);
if(strcmp(buffer, "***VERTS")==0){
if(strcmp(buffer, "***CANVAS")==0){
fprintf(stream_out, "<canvas width = \"%i\" height = \"%i\" id = \"my_Canvas\"></canvas>",screenWidth,screenHeight);
}
else if(strcmp(buffer, "***VERTS")==0){
int i;

fprintf(stream_out," var vertices = [\n");
Expand Down

0 comments on commit 0e04aaf

Please # to comment.