From: Alan N. <ala...@us...> - 2008-12-09 15:54:03
|
Update of /cvsroot/vapor/vapor/lib/params In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18022/lib/params Modified Files: datastatus.h Log Message: Fixed bug 2407726. Now the renderer tabs do not get enabled unless there exists 2D or 3D data that they can use. Added methods to datastatus to tell if 2D or 3D data exists. Windows changes for GetAppPath. Index: datastatus.h =================================================================== RCS file: /cvsroot/vapor/vapor/lib/params/datastatus.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** datastatus.h 20 Oct 2008 21:20:37 -0000 1.39 --- datastatus.h 9 Dec 2008 15:53:58 -0000 1.40 *************** *** 91,94 **** --- 91,112 ---- return (maxNumTransforms2D[sesvarnum][timestep] >= 0); } + bool dataIsPresent3D(int timestep){ + if (!dataMgr) return false; + if (timestep < (int)minTimeStep || timestep > (int)maxTimeStep) return false; + for (int i = 0; i<variableExists.size(); i++){ + if (variableExists[i] && maxNumTransforms[i][timestep] >= 0) + return true; + } + return false; + } + bool dataIsPresent2D(int timestep){ + if (!dataMgr) return false; + if (timestep < (int)minTimeStep || timestep > (int)maxTimeStep) return false; + for (int i = 0; i<variableExists2D.size(); i++){ + if (variableExists2D[i] && maxNumTransforms2D[i][timestep] >= 0) + return true; + } + return false; + } bool dataIsPresent(int timestep){ if (!dataMgr) return false; *************** *** 104,108 **** return false; } ! bool dataIsLayered(); --- 122,137 ---- return false; } ! bool dataIsPresent3D(){ ! for (int t = (int)minTimeStep; t <= (int)maxTimeStep; t++) { ! if (dataIsPresent3D(t)) return true; ! } ! return false; ! } ! bool dataIsPresent2D(){ ! for (int t = (int)minTimeStep; t <= (int)maxTimeStep; t++) { ! if (dataIsPresent2D(t)) return true; ! } ! return false; ! } bool dataIsLayered(); |