Skip to content

Commit 1ed3ed2

Browse files
authored
Merge pull request #1367 from gforney/master
preserve clipping state when changing viewpoints
2 parents 33420d4 + afa35eb commit 1ed3ed2

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Source/smokeview/camera.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ void CopyCamera(cameradata *to, cameradata *from){
325325
UpdateGluiZoom();
326326
}
327327
to->dirty=1;
328-
if(to==camera_current&&updateclipvals==0){
328+
if(to == camera_current && updateclipvals == 0 && reset_clipvals == 1){
329329
Cam2Clip(camera_current);
330330
}
331331
if(to==camera_current&&to->quat_defined==1){

Source/smokeview/glui_clip.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ void ClipCB(int var){
171171
case SPINNER_zlower:
172172
case SPINNER_zupper:
173173
updatefacelists = 1;
174+
reset_clipvals = 0;
174175
break;
175176
default:
176177
ASSERT(FFALSE);
@@ -203,6 +204,7 @@ void ClipCB(int var){
203204
camera_current->ymax = clipinfo.ymax;
204205
camera_current->zmin = clipinfo.zmin;
205206
camera_current->zmax = clipinfo.zmax;
207+
reset_clipvals = 0;
206208
break;
207209
default:
208210
ASSERT(FFALSE);

Source/smokeview/smokeviewvars.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "glutbitmap.h"
2424
#endif
2525

26+
SVEXTERN int SVDECL(reset_clipvals, 1);
2627
SVEXTERN int SVDECL(update_slicexyz, 0);
2728
SVEXTERN int SVDECL(update_splitcolorbar, 0);
2829
SVEXTERN int SVDECL(slice_plot_bound_option, 1);

0 commit comments

Comments
 (0)