diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 625373c51f1668d67535677dcc5a4d92a671379d..def30ad324ffe6d864a659b502f730f92dd5197b 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -1309,7 +1309,8 @@ StringXNumber SolverOptions_Number[] = { { F|O, "AutoShowViews" , opt_solver_auto_show_views , 2. , "Automcatically show newly merged results (0: none; 1: all; 2: last one)" }, { 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. , "Enable default solver plugins?" }, diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 2cd51772463491c8acf379305f685bceb76cb35d..80360803c32dd200264662ec46b08c853318a10e 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -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){ steps.resize(PView::list.size(), 0); for(unsigned int i = 0; i < PView::list.size(); i++){ 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); } }