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

Use sensible defaults for all *_choice widgets
parent 627f51e6
No related branches found
No related tags found
No related merge requests found
// $Id: Options.cpp,v 1.141 2004-04-08 22:14:28 geuzaine Exp $ // $Id: Options.cpp,v 1.142 2004-04-13 18:46:53 geuzaine Exp $
// //
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// //
...@@ -2906,7 +2906,7 @@ double opt_geometry_point_type(OPT_ARGS_NUM) ...@@ -2906,7 +2906,7 @@ double opt_geometry_point_type(OPT_ARGS_NUM)
} }
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(WID && (action & GMSH_GUI)) { if(WID && (action & GMSH_GUI)) {
WID->geo_choice[0]->value(CTX.geom.point_type); WID->geo_choice[0]->value(CTX.geom.point_type ? 1 : 0);
} }
#endif #endif
return CTX.geom.point_type; return CTX.geom.point_type;
...@@ -2937,7 +2937,7 @@ double opt_geometry_line_type(OPT_ARGS_NUM) ...@@ -2937,7 +2937,7 @@ double opt_geometry_line_type(OPT_ARGS_NUM)
} }
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(WID && (action & GMSH_GUI)) { if(WID && (action & GMSH_GUI)) {
WID->geo_choice[1]->value(CTX.geom.line_type); WID->geo_choice[1]->value(CTX.geom.line_type ? 1 : 0);
} }
#endif #endif
return CTX.geom.line_type; return CTX.geom.line_type;
...@@ -3290,7 +3290,7 @@ double opt_mesh_point_type(OPT_ARGS_NUM) ...@@ -3290,7 +3290,7 @@ double opt_mesh_point_type(OPT_ARGS_NUM)
} }
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(WID && (action & GMSH_GUI)) { if(WID && (action & GMSH_GUI)) {
WID->mesh_choice[0]->value(CTX.mesh.point_type); WID->mesh_choice[0]->value(CTX.mesh.point_type ? 1 : 0);
} }
#endif #endif
return CTX.mesh.point_type; return CTX.mesh.point_type;
...@@ -3317,7 +3317,7 @@ double opt_mesh_line_type(OPT_ARGS_NUM) ...@@ -3317,7 +3317,7 @@ double opt_mesh_line_type(OPT_ARGS_NUM)
} }
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(WID && (action & GMSH_GUI)) { if(WID && (action & GMSH_GUI)) {
WID->mesh_choice[1]->value(CTX.mesh.line_type); WID->mesh_choice[1]->value(CTX.mesh.line_type ? 1 : 0);
} }
#endif #endif
return CTX.mesh.line_type; return CTX.mesh.line_type;
...@@ -4088,12 +4088,13 @@ double opt_view_intervals_type(OPT_ARGS_NUM) ...@@ -4088,12 +4088,13 @@ double opt_view_intervals_type(OPT_ARGS_NUM)
case DRAW_POST_DISCRETE: case DRAW_POST_DISCRETE:
WID->view_choice[0]->value(1); WID->view_choice[0]->value(1);
break; break;
case DRAW_POST_CONTINUOUS:
WID->view_choice[0]->value(2);
break;
case DRAW_POST_NUMERIC: case DRAW_POST_NUMERIC:
WID->view_choice[0]->value(3); WID->view_choice[0]->value(3);
break; break;
case DRAW_POST_CONTINUOUS:
default:
WID->view_choice[0]->value(2);
break;
} }
} }
#endif #endif
...@@ -4551,15 +4552,16 @@ double opt_view_scale_type(OPT_ARGS_NUM) ...@@ -4551,15 +4552,16 @@ double opt_view_scale_type(OPT_ARGS_NUM)
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(_gui_action_valid(action, num)) { if(_gui_action_valid(action, num)) {
switch (v->ScaleType) { switch (v->ScaleType) {
case DRAW_POST_LINEAR:
WID->view_choice[1]->value(0);
break;
case DRAW_POST_LOGARITHMIC: case DRAW_POST_LOGARITHMIC:
WID->view_choice[1]->value(1); WID->view_choice[1]->value(1);
break; break;
case DRAW_POST_DOUBLELOGARITHMIC: case DRAW_POST_DOUBLELOGARITHMIC:
WID->view_choice[1]->value(2); WID->view_choice[1]->value(2);
break; break;
case DRAW_POST_LINEAR:
default:
WID->view_choice[1]->value(0);
break;
} }
} }
#endif #endif
...@@ -4576,15 +4578,16 @@ double opt_view_range_type(OPT_ARGS_NUM) ...@@ -4576,15 +4578,16 @@ double opt_view_range_type(OPT_ARGS_NUM)
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(_gui_action_valid(action, num)){ if(_gui_action_valid(action, num)){
switch(v->RangeType){ switch(v->RangeType){
case DRAW_POST_RANGE_DEFAULT:
WID->view_choice[7]->value(0);
break;
case DRAW_POST_RANGE_PER_STEP: case DRAW_POST_RANGE_PER_STEP:
WID->view_choice[7]->value(1); WID->view_choice[7]->value(1);
break; break;
case DRAW_POST_RANGE_CUSTOM: case DRAW_POST_RANGE_CUSTOM:
WID->view_choice[7]->value(2); WID->view_choice[7]->value(2);
break; break;
case DRAW_POST_RANGE_DEFAULT:
default:
WID->view_choice[7]->value(0);
break;
} }
} }
#endif #endif
...@@ -4601,12 +4604,13 @@ double opt_view_tensor_type(OPT_ARGS_NUM) ...@@ -4601,12 +4604,13 @@ double opt_view_tensor_type(OPT_ARGS_NUM)
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(_gui_action_valid(action, num)) { if(_gui_action_valid(action, num)) {
switch (v->TensorType) { switch (v->TensorType) {
case DRAW_POST_VONMISES:
WID->view_choice[4]->value(0);
break;
case DRAW_POST_EIGENVECTORS: case DRAW_POST_EIGENVECTORS:
WID->view_choice[4]->value(1); WID->view_choice[4]->value(1);
break; break;
case DRAW_POST_VONMISES:
default:
WID->view_choice[4]->value(0);
break;
} }
} }
#endif #endif
...@@ -4655,12 +4659,13 @@ double opt_view_arrow_location(OPT_ARGS_NUM) ...@@ -4655,12 +4659,13 @@ double opt_view_arrow_location(OPT_ARGS_NUM)
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
if(_gui_action_valid(action, num)) { if(_gui_action_valid(action, num)) {
switch (v->ArrowLocation) { switch (v->ArrowLocation) {
case DRAW_POST_LOCATE_COG:
WID->view_choice[3]->value(0);
break;
case DRAW_POST_LOCATE_VERTEX: case DRAW_POST_LOCATE_VERTEX:
WID->view_choice[3]->value(1); WID->view_choice[3]->value(1);
break; break;
case DRAW_POST_LOCATE_COG:
default:
WID->view_choice[3]->value(0);
break;
} }
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment