Commit e25ebf91 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

vlist_var.c::vlistDefFlag: compute vlistptr->vars[varID].flag

parent 6fb63c89
......@@ -1529,8 +1529,6 @@ void vlistDefFlag(int vlistID, int varID, int levID, int flag)
vlistptr = vlist_to_pointer(vlistID);
vlistptr->vars[varID].flag = flag;
levinfo_t li = DEFAULT_LEVINFO(levID);
if (vlistptr->vars[varID].levinfo)
;
......@@ -1538,7 +1536,20 @@ void vlistDefFlag(int vlistID, int varID, int levID, int flag)
cdiVlistCreateVarLevInfo(vlistptr, varID);
else
return;
vlistptr->vars[varID].levinfo[levID].flag = flag;
vlistptr->vars[varID].flag = 0;
int nlevs = zaxisInqSize(vlistptr->vars[varID].zaxisID);
for ( int levelID = 0; levelID < nlevs; levelID++ )
{
if ( vlistptr->vars[varID].levinfo[levelID].flag )
{
vlistptr->vars[varID].flag = 1;
break;
}
}
}
......@@ -1576,7 +1587,7 @@ int vlistFindVar(int vlistID, int fvarID)
Message("varID not found for fvarID %d in vlistID %d!", fvarID, vlistID);
}
return (varID);
return (varID);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment