Skip to content

Commit

Permalink
Merge pull request firemodels#1926 from gforney/master
Browse files Browse the repository at this point in the history
smokeview source: fix to colorbar setting
  • Loading branch information
gforney authored May 29, 2024
2 parents cdf6773 + d786767 commit 526c020
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Source/smokeview/IOslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -4352,7 +4352,10 @@ FILE_SIZE ReadSlice(const char *file, int ifile, int time_frame, float *time_val
}
}
if(strcmp(sd->label.shortlabel, "TOA")==0){
contour_type_save = contour_type;
if(is_toa_slice != 1){
contour_type_save = contour_type;
is_toa_slice = 1;
}
ColorbarMenu(COLORBAR_LINES);
int set_chopmax = 1;
float chopmax = 121.0;
Expand All @@ -4362,6 +4365,7 @@ FILE_SIZE ReadSlice(const char *file, int ifile, int time_frame, float *time_val
GLUISetChopHide("TOA", 1);
}
else{
is_toa_slice = 0;
if(contour_type_save == SHADED_CONTOURS)ColorbarMenu(COLORBAR_CONTINUOUS);
if(contour_type_save == STEPPED_CONTOURS)ColorbarMenu(COLORBAR_STEPPED);
if(contour_type_save == LINE_CONTOURS)ColorbarMenu(COLORBAR_LINES);
Expand Down
1 change: 0 additions & 1 deletion Source/smokeview/readsmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -14614,7 +14614,6 @@ int ReadIni2(char *inifile, int localfile){
fgets(buffer, 255, stream);
sscanf(buffer, "%i", &contour_type);
contour_type = CLAMP(contour_type, 0, 2);
contour_type_save = contour_type;
continue;
}
if(MatchINI(buffer, "P3CONT3DSMOOTH") == 1){
Expand Down
1 change: 1 addition & 0 deletions Source/smokeview/smokeviewvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,7 @@ SVEXTERN int SVDECL(uindex,-1), SVDECL(vindex,-1), SVDECL(windex,-1);

SVEXTERN int SVDECL(contour_type,0), SVDECL(p3cont3dsmooth,0);
SVEXTERN int SVDECL(contour_type_save, -1);
SVEXTERN int SVDECL(is_toa_slice, 0);
SVEXTERN int SVDECL(cullfaces,1);
SVEXTERN int SVDECL(showonly_hiddenfaces,0);

Expand Down

0 comments on commit 526c020

Please sign in to comment.