From a710b30c268c4ec7ca7a2daba98f7acd6561b112 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 24 May 2001 10:11:29 +0000 Subject: [PATCH] ColorTable option fix --- Common/DefaultOptions.h | 2 +- Common/Options.cpp | 4 ++-- Common/Views.cpp | 7 ++----- Fltk/GUI.cpp | 4 ++-- Mesh/Read_Mesh.cpp | 11 ++++++++--- doc/VERSIONS | 10 +++++----- tutorial/README | 4 ++-- tutorial/t3.geo | 3 ++- tutorial/tutorial.html | 16 ++++++++-------- 9 files changed, 32 insertions(+), 29 deletions(-) diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 9d1cfc6ec8..d503d00c03 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -24,7 +24,7 @@ StringXString GeneralOptions_String[] = { { F|S, "ErrorFileName" , opt_general_error_filename , ".gmsh-errors" , "File into which the log is saved if a fatal error occurs" }, { F|S, "OptionsFileName" , opt_general_options_filename , ".gmsh-options" , - "File created in your home directory with 'Options->Save options', and which is read on startup" }, + "File created in your home directory with 'Options->Save options now', and which is read on startup" }, #ifdef WIN32 { F|O, "TextEditor" , opt_general_editor , "notepad %s" , #else diff --git a/Common/Options.cpp b/Common/Options.cpp index 0966731896..d4000f561a 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.23 2001-05-23 07:29:42 geuzaine Exp $ +// $Id: Options.cpp,v 1.24 2001-05-24 10:11:28 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -172,7 +172,7 @@ void Print_Options(int num, int level, char *filename){ fprintf(file, "// This file takes configuration options (preferences) that\n"); fprintf(file, "// should be loaded each time Gmsh is launched. You can create\n"); fprintf(file, "// this file by hand, or let Gmsh generate it for you (with\n"); - fprintf(file, "// the 'Options->Save options' menu button). This file can\n"); + fprintf(file, "// the 'Options->Save options now' menu button). This file can\n"); fprintf(file, "// also be automatically regenerated every time you quit\n"); fprintf(file, "// Gmsh if the option 'General.SaveOptions' is set. If\n"); fprintf(file, "// this file isn't found, defaults are used.\n"); diff --git a/Common/Views.cpp b/Common/Views.cpp index 824d06ef57..d18989e8e9 100644 --- a/Common/Views.cpp +++ b/Common/Views.cpp @@ -1,4 +1,4 @@ -// $Id: Views.cpp,v 1.37 2001-04-29 14:35:32 geuzaine Exp $ +// $Id: Views.cpp,v 1.38 2001-05-24 10:11:28 geuzaine Exp $ #include <set> #include "Gmsh.h" @@ -87,6 +87,7 @@ void BeginView(int allocate){ ActualView->SS = NULL; ActualView->VS = NULL; ActualView->TS = NULL; } + // Copy all options from the reference view initialized in InitOptions() CopyViewOptions(Post_ViewReference, ActualView); ActualView->Changed = 1; @@ -98,10 +99,6 @@ void BeginView(int allocate){ ActualView->BBox[2*i] = 1.e200; ActualView->BBox[2*i+1] = -1.e200; } - ActualView->CT.size = 255; - ActualView->CT.ipar[COLORTABLE_MODE] = COLORTABLE_RGB; - ColorTable_InitParam(1, &ActualView->CT, 1, 1); - ColorTable_Recompute(&ActualView->CT, 1, 1); } diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index a4587e53b3..8a01411d62 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.79 2001-05-23 07:29:42 geuzaine Exp $ +// $Id: GUI.cpp,v 1.80 2001-05-24 10:11:28 geuzaine Exp $ // To make the interface as visually consistent as possible, please: // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc. @@ -63,7 +63,7 @@ Fl_Menu_Item m_menubar_table[] = { {"Geometry...", FL_SHIFT+'g', (Fl_Callback *)opt_geometry_cb, 0}, {"Mesh...", FL_SHIFT+'m', (Fl_Callback *)opt_mesh_cb, 0}, {"Post-processing...", FL_SHIFT+'p', (Fl_Callback *)opt_post_cb, 0, FL_MENU_DIVIDER}, - {"Save options", 0, (Fl_Callback *)opt_save_cb, 0}, + {"Save options now", 0, (Fl_Callback *)opt_save_cb, 0}, {0}, {"Help",0,0,0,FL_SUBMENU}, {"Current options...", 0, (Fl_Callback *)status_xyz1p_cb, (void*)4}, diff --git a/Mesh/Read_Mesh.cpp b/Mesh/Read_Mesh.cpp index 204075cf2e..b95f8eb01c 100644 --- a/Mesh/Read_Mesh.cpp +++ b/Mesh/Read_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Read_Mesh.cpp,v 1.14 2001-05-23 07:29:42 geuzaine Exp $ +// $Id: Read_Mesh.cpp,v 1.15 2001-05-24 10:11:28 geuzaine Exp $ #include "Gmsh.h" #include "Geo.h" @@ -210,11 +210,16 @@ void Read_Mesh_MSH (Mesh *M, FILE *File_GEO){ Gamma_Maillage(M, &M->Statistics[17], &M->Statistics[18], &M->Statistics[19]); Eta_Maillage(M, &M->Statistics[20], &M->Statistics[21], &M->Statistics[22]); R_Maillage(M, &M->Statistics[23], &M->Statistics[24], &M->Statistics[25]); + M->Statistics[6]=Tree_Nbr(M->Vertices); //incorrect, mais... } - else if(Tree_Nbr(M->Surfaces)) + else if(Tree_Nbr(M->Surfaces)){ M->status = 2 ; - else if(Tree_Nbr(M->Curves)) + M->Statistics[5]=Tree_Nbr(M->Vertices); //incorrect, mais... + } + else if(Tree_Nbr(M->Curves)){ M->status = 1 ; + M->Statistics[4]=Tree_Nbr(M->Vertices); //incorrect, mais... + } else if(Tree_Nbr(M->Points)) M->status = 0 ; else diff --git a/doc/VERSIONS b/doc/VERSIONS index f55c75c836..7dab5158e4 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,9 +1,9 @@ -$Id: VERSIONS,v 1.18 2001-05-23 07:29:42 geuzaine Exp $ +$Id: VERSIONS,v 1.19 2001-05-24 10:11:29 geuzaine Exp $ -New in 1.20: Various bug fixes (Includes & Functions, solver -command...) and small enhancements (menu reorganization, constrained -background mesh, mesh visibility options, geometry edition, quality -histograms...) +New in 1.20: Various bug fixes (Functions in Includes, solver command, +ColorTable option, ...) and small enhancements (menu reorganization, +constrained background mesh, mesh visibility options, geometry +edition, mesh quality histograms, ...) New in 1.19: Fixed seg. fault for scalar simplex post-processing; new Solver menu; interface for GetDP solver through sockets; fixed diff --git a/tutorial/README b/tutorial/README index 467f889266..2c618d53ba 100644 --- a/tutorial/README +++ b/tutorial/README @@ -1,4 +1,4 @@ -$Id: README,v 1.11 2001-05-20 19:24:53 geuzaine Exp $ +$Id: README,v 1.12 2001-05-24 10:11:29 geuzaine Exp $ Here are the examples in the Gmsh tutorial. These examples are commented (both C and C++-style comments can be used in Gmsh input @@ -97,7 +97,7 @@ current values, can be saved into a file by selecting 'File->Save as->GEO complete options', or simply viewed by pressing the '?' button in the status bar. To save the current options as your default preferences for all future Gmsh sessions, use the 'Options->Save -options' menu.] +options now' menu.] OK, that's all, folks. Enjoy the tutorial. diff --git a/tutorial/t3.geo b/tutorial/t3.geo index 4d86a5584a..8ba3ea9209 100644 --- a/tutorial/t3.geo +++ b/tutorial/t3.geo @@ -62,4 +62,5 @@ Geometry.Color.Surfaces = Geometry.Color.Points; // will dump all current options to the terminal. To save all // available options to a file, use the 'File->Save as->GEO complete // options' menu. To save the current options as the default options -// for all future Gmsh sessions, use the 'Options->Save options' menu. +// for all future Gmsh sessions, use the 'Options->Save options now' +// menu. diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html index 01c19eb479..893161e73a 100644 --- a/tutorial/tutorial.html +++ b/tutorial/tutorial.html @@ -22,7 +22,7 @@ <H1>README 1/9</H1> [<A HREF="#top">top</A>][prev][<A HREF="#file2">next</A>] <PRE> -$Id: tutorial.html,v 1.10 2001-05-20 19:24:53 geuzaine Exp $ +$Id: tutorial.html,v 1.11 2001-05-24 10:11:29 geuzaine Exp $ Here are the examples in the Gmsh tutorial. These examples are commented (both C and C++-style comments can be used in Gmsh input @@ -117,11 +117,11 @@ all the other views, select the 'Link all views' option in the [NOTE: All the options specified interactively can also be directly specified in the ascii input files. All available options, with their -current values, can be saved into a file by selecting -'File->Save as->GEO complete options', or simply viewed by pressing -the '?' button in the status bar. To save the current options as your -default preferences for all future Gmsh sessions, use the -'Options->Save current options' menu.] +current values, can be saved into a file by selecting 'File->Save +as->GEO complete options', or simply viewed by pressing the '?' button +in the status bar. To save the current options as your default +preferences for all future Gmsh sessions, use the 'Options->Save +options now' menu.] OK, that's all, folks. Enjoy the tutorial. @@ -392,8 +392,8 @@ Geometry.Color.Surfaces = Geometry.Color.Points; </FONT></I><I><FONT COLOR="#B22222">// will dump all current options to the terminal. To save all </FONT></I><I><FONT COLOR="#B22222">// available options to a file, use the 'File->Save as->GEO complete </FONT></I><I><FONT COLOR="#B22222">// options' menu. To save the current options as the default options -</FONT></I><I><FONT COLOR="#B22222">// for all future Gmsh sessions, use the 'Options->Save current -</FONT></I><I><FONT COLOR="#B22222">// options' menu. +</FONT></I><I><FONT COLOR="#B22222">// for all future Gmsh sessions, use the 'Options->Save options now' +</FONT></I><I><FONT COLOR="#B22222">// menu. </FONT></I></PRE> <HR> <A NAME="file5"> -- GitLab