Skip to content
Snippets Groups Projects
Commit ad4df402 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

better fix, but not perfect yet

parent d4797a29
No related branches found
No related tags found
No related merge requests found
......@@ -235,11 +235,13 @@ void status_play_manual(int time, int step)
// skip any empty steps (useful when merging only some steps)
int newStep = (int)opt_view_timestep(i, GMSH_GET, 0) + step;
int totalSteps = (int)opt_view_nb_timestep(i, GMSH_GET, 0);
while(newStep < totalSteps){
for(int j = 0; j < totalSteps; j++){
if(PView::list[i]->getData()->hasTimeStep(newStep))
break;
else
newStep += step;
if(newStep < 0) newStep = totalSteps - 1;
if(newStep > totalSteps - 1) newStep = 0;
}
opt_view_timestep(i, GMSH_SET | GMSH_GUI, newStep);
}
......
......@@ -489,7 +489,8 @@ bool PViewDataGModel::skipElement(int step, int ent, int ele, bool checkVisibili
bool PViewDataGModel::hasTimeStep(int step)
{
if(step < getNumTimeSteps() && _steps[step]->getNumData()) return true;
if(step >= 0 && step < getNumTimeSteps() && _steps[step]->getNumData())
return true;
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment