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

experimental: only show the last step if we have more than 2 steps (to avoid...

experimental: only show the last step if we have more than 2 steps (to avoid always showing the imaginary part for complex fields)
parent 1421cd8c
No related branches found
No related tags found
No related merge requests found
...@@ -1309,7 +1309,8 @@ StringXNumber SolverOptions_Number[] = { ...@@ -1309,7 +1309,8 @@ StringXNumber SolverOptions_Number[] = {
{ F|O, "AutoShowViews" , opt_solver_auto_show_views , 2. , { F|O, "AutoShowViews" , opt_solver_auto_show_views , 2. ,
"Automcatically show newly merged results (0: none; 1: all; 2: last one)" }, "Automcatically show newly merged results (0: none; 1: all; 2: last one)" },
{ F|O, "AutoShowLastStep" , opt_solver_auto_show_last_step , 1. , { F|O, "AutoShowLastStep" , opt_solver_auto_show_last_step , 1. ,
"Automatically show the last time step in newly merged results" }, "Automatically show the last step in newly merged results, if there are "
"more than 2 steps" },
{ F|O, "Plugins" , opt_solver_plugins , 0. , { F|O, "Plugins" , opt_solver_plugins , 0. ,
"Enable default solver plugins?" }, "Enable default solver plugins?" },
......
...@@ -616,12 +616,13 @@ int MergePostProcessingFile(const std::string &fileName, int showViews, ...@@ -616,12 +616,13 @@ int MergePostProcessingFile(const std::string &fileName, int showViews,
} }
} }
// if we added steps, go to the last one // if we added steps, and we have more than 2 (to avoid always showing the
// imaginary part for complex fields), go to the last one
if(showLastStep){ if(showLastStep){
steps.resize(PView::list.size(), 0); steps.resize(PView::list.size(), 0);
for(unsigned int i = 0; i < PView::list.size(); i++){ for(unsigned int i = 0; i < PView::list.size(); i++){
int step = (int)opt_view_nb_timestep(i, GMSH_GET, 0); int step = (int)opt_view_nb_timestep(i, GMSH_GET, 0);
if(step > steps[i]) if(step > steps[i] && steps[i] > 1)
opt_view_timestep(i, GMSH_SET|GMSH_GUI, step - 1); opt_view_timestep(i, GMSH_SET|GMSH_GUI, step - 1);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment