From 8aff473c3d462570bf393e726a7525b24c847acb Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 28 Nov 2003 19:15:29 +0000
Subject: [PATCH] Set View.ShowTime=2 to show the time value even if the view
 contains a single time step..

---
 Common/DefaultOptions.h      | 2 +-
 Graphics/Graph2D.cpp         | 9 +++++----
 Graphics/Scale.cpp           | 8 ++++----
 doc/texinfo/opt_general.texi | 2 +-
 doc/texinfo/opt_solver.texi  | 8 +++++---
 doc/texinfo/opt_view.texi    | 2 +-
 6 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index e08befb646..9ce61bbf62 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -965,7 +965,7 @@ StringXNumber ViewOptions_Number[] = {
   { F|O, "ShowScale" , opt_view_show_scale , 1. ,
     "Show value scale?" },
   { F|O, "ShowTime" , opt_view_show_time , 1. ,
-    "Show time value (or time step) if NbTimeStep > 1?" },
+    "Show time value (or time step number) in the scale? (1=only if NbTimeStep>1, 2=always)" },
   { F|O, "SmoothNormals" , opt_view_smooth_normals , 0. ,
     "Smooth the normals?" },
   { F|O, "TensorType" , opt_view_tensor_type , 0. ,
diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp
index 83630b118c..90c80ef431 100644
--- a/Graphics/Graph2D.cpp
+++ b/Graphics/Graph2D.cpp
@@ -1,4 +1,4 @@
-// $Id: Graph2D.cpp,v 1.28 2003-03-21 00:52:39 geuzaine Exp $
+// $Id: Graph2D.cpp,v 1.29 2003-11-28 19:15:29 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -202,9 +202,10 @@ static void Draw_Graph2D(Post_View * v,
 
   if(v->ShowScale) {
     glColor4ubv((GLubyte *) & CTX.color.text);
-    if(v->Type == DRAW_POST_2D_SPACE && List_Nbr(v->Time) > 1 && v->ShowTime)
-      sprintf(label, "%s (%g)", v->Name,
-              *(double *)List_Pointer(v->Time, v->TimeStep));
+    if(v->Type == DRAW_POST_2D_SPACE &&
+       ((v->ShowTime == 1 && List_Nbr(v->Time) > 1) ||
+	(v->ShowTime == 2 && List_Nbr(v->Time) > 0)))
+      sprintf(label, "%s (%g)", v->Name, *(double *)List_Pointer(v->Time, v->TimeStep));
     else
       sprintf(label, "%s", v->Name);
     glRasterPos2d(xtop - gl_width(label) / 2., ytop + 1.5 * font_h);
diff --git a/Graphics/Scale.cpp b/Graphics/Scale.cpp
index 80749a2b65..159da8ded2 100644
--- a/Graphics/Scale.cpp
+++ b/Graphics/Scale.cpp
@@ -1,4 +1,4 @@
-// $Id: Scale.cpp,v 1.35 2003-03-21 00:52:39 geuzaine Exp $
+// $Id: Scale.cpp,v 1.36 2003-11-28 19:15:29 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -189,9 +189,9 @@ void draw_scale(Post_View * v,
   // the label
 
   glRasterPos2d(cv_xmin, ymin - 2 * font_h);
-  if(List_Nbr(v->Time) > 1 && v->ShowTime)
-    sprintf(label, "%s (%g)", v->Name,
-            *(double *)List_Pointer(v->Time, v->TimeStep));
+  if((v->ShowTime == 1 && List_Nbr(v->Time) > 1) ||
+     (v->ShowTime == 2 && List_Nbr(v->Time) > 0))
+    sprintf(label, "%s (%g)", v->Name, *(double *)List_Pointer(v->Time, v->TimeStep));
   else
     sprintf(label, "%s", v->Name);
   Draw_String(label);
diff --git a/doc/texinfo/opt_general.texi b/doc/texinfo/opt_general.texi
index 0c0a735249..e2840781e5 100644
--- a/doc/texinfo/opt_general.texi
+++ b/doc/texinfo/opt_general.texi
@@ -45,7 +45,7 @@ Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
 @item General.AppleMenuBar
-Use Apple-style menu bar?@*
+Use Apple-style menu bar on Mac OS X?@*
 Default value: @code{0}@*
 Saved in: @code{General.SessionFileName}
 
diff --git a/doc/texinfo/opt_solver.texi b/doc/texinfo/opt_solver.texi
index cf08e2b555..769c804faa 100644
--- a/doc/texinfo/opt_solver.texi
+++ b/doc/texinfo/opt_solver.texi
@@ -6,9 +6,11 @@ Saved in: @code{General.OptionsFileName}
 
 @item Solver.Help0
 Help string for solver 0@*
-Default value: @code{"A General environment for the treatment of Discrete
-Problems. Copyright (C) 1997-2003 Patrick Dular and Christophe
-Geuzaine. Visit http://www.geuz.org/getdp/ for more info"}@*
+Default value: @code{"A General environment for the treatment of
+Discrete Problems.
+Copyright (C) 1997-2003
+Patrick Dular and Christophe Geuzaine.
+Visit http://www.geuz.org/getdp/ for more info"}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Solver.Executable0
diff --git a/doc/texinfo/opt_view.texi b/doc/texinfo/opt_view.texi
index 3e346915dd..396f083f8a 100644
--- a/doc/texinfo/opt_view.texi
+++ b/doc/texinfo/opt_view.texi
@@ -260,7 +260,7 @@ Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
 @item View.ShowTime
-Show time value (or time step) if NbTimeStep > 1?@*
+Show time value (or time step number) in the scale? (1=only if NbTimeStep>1, 2=always)@*
 Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
-- 
GitLab