diff --git a/Common/Context.h b/Common/Context.h
index ed47ca53c3dd62c7bdd4de54ff7856b964b35ba5..a79fb84706fb00c6374a0174ec1d8606a95edeee 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -161,7 +161,7 @@ public :
     int surfaces_edges, surfaces_faces, volumes_edges, volumes_faces;
     int points_num, lines_num, surfaces_num, volumes_num;
     double label_frequency;
-    int point_type, line_type; // flat or 3D
+    int point_type; // flat or 3D
     double point_size, line_width;
     int optimize;
     double quality;
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index d5f411d369faa38421330ed1c28940b26c9cbbda..c0e8ae34c960ab96aa9e49f20ca36f0432d874f3 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -907,8 +907,6 @@ StringXNumber MeshOptions_Number[] = {
     "Display mesh lines (1D elements)?" },
   { F|O, "LineNumbers" , opt_mesh_lines_num , 0. , 
     "Display mesh line numbers?" },
-  { F|O, "LineType" , opt_mesh_line_type , 0. , 
-    "Display mesh lines as solid color segments (0) or 3D cylinders (1)" },
   { F|O, "LineWidth" , opt_mesh_line_width , 1.0 , 
     "Display width of mesh lines (in pixels)" },
 
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 7e8a22e0815037097447e922995eba10f213a22a..f0d0082164d1e7793772c64780ff16947119334f 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.306 2006-08-26 17:00:25 geuzaine Exp $
+// $Id: Options.cpp,v 1.307 2006-08-27 16:14:46 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -4486,19 +4486,6 @@ double opt_mesh_label_frequency(OPT_ARGS_NUM)
   return CTX.mesh.label_frequency;
 }
 
-double opt_mesh_line_type(OPT_ARGS_NUM)
-{
-  if(action & GMSH_SET) {
-    CTX.mesh.line_type = (int)val;
-  }
-#if defined(HAVE_FLTK)
-  if(WID && (action & GMSH_GUI)) {
-    WID->mesh_choice[1]->value(CTX.mesh.line_type ? 1 : 0);
-  }
-#endif
-  return CTX.mesh.line_type;
-}
-
 double opt_mesh_reverse_all_normals(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET) {
diff --git a/Common/Options.h b/Common/Options.h
index 0d741ac44cfbd7b659edaaf876075765fe87c477..49e099cc0179793a27ab2c1dca80e684758b16a6 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -437,7 +437,6 @@ double opt_mesh_volumes_num(OPT_ARGS_NUM);
 double opt_mesh_point_size(OPT_ARGS_NUM);
 double opt_mesh_point_type(OPT_ARGS_NUM);
 double opt_mesh_line_width(OPT_ARGS_NUM);
-double opt_mesh_line_type(OPT_ARGS_NUM);
 double opt_mesh_vertex_arrays(OPT_ARGS_NUM);
 double opt_mesh_reverse_all_normals(OPT_ARGS_NUM);
 double opt_mesh_smooth_normals(OPT_ARGS_NUM);
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index ecb6dbba99291676ce5b7e1839bf7cbcba120ae8..4197ec044bc83f4921a823429adc33f3cc237327 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.453 2006-08-26 22:30:06 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.454 2006-08-27 16:14:46 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -1179,7 +1179,6 @@ void mesh_options_ok_cb(CALLBACK_ARGS)
   opt_mesh_beta_smooth_metric(0, GMSH_SET, WID->mesh_value[25]->value());
 
   opt_mesh_point_type(0, GMSH_SET, WID->mesh_choice[0]->value());
-  opt_mesh_line_type(0, GMSH_SET, WID->mesh_choice[1]->value());
   opt_mesh_algo2d(0, GMSH_SET,
 		  (WID->mesh_choice[2]->value() == 0) ? DELAUNAY_ISO :
 		  (WID->mesh_choice[2]->value() == 1) ? DELAUNAY_ANISO :
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index af7bf8efb2fd2dfa28cddb9f931a4f2b48ba1c06..27eeb22910d88c67a564278d8041904135e3957a 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.543 2006-08-26 22:30:06 geuzaine Exp $
+// $Id: GUI.cpp,v 1.544 2006-08-27 16:14:46 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -2496,6 +2496,7 @@ void GUI::create_option_window()
       mesh_value[12]->maximum(100);
       mesh_value[12]->step(1);
       mesh_value[12]->align(FL_ALIGN_RIGHT);
+      mesh_value[12]->when(FL_WHEN_RELEASE);
       mesh_value[12]->callback(mesh_options_ok_cb);
 
       static Fl_Menu_Item menu_mesh_element_types[] = {
@@ -2652,13 +2653,7 @@ void GUI::create_option_window()
       mesh_value[10]->align(FL_ALIGN_RIGHT);
       mesh_value[10]->callback(mesh_options_ok_cb);
 
-      mesh_choice[1] = new Fl_Choice(L + 2 * WB, 2 * WB + 4 * BH, IW, BH, "Line display");
-      mesh_choice[1]->menu(menu_line_display);
-      mesh_choice[1]->align(FL_ALIGN_RIGHT);
-      mesh_choice[1]->deactivate(); // don't give false hopes, as it's not used anywhere right now
-      mesh_choice[1]->callback(mesh_options_ok_cb);
-
-      mesh_value[11] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 5 * BH, IW, BH, "Line width");
+      mesh_value[11] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 4 * BH, IW, BH, "Line width");
       mesh_value[11]->minimum(0.1);
       mesh_value[11]->maximum(50);
       mesh_value[11]->step(0.1);
diff --git a/Fltk/SpherePosition_Widget.h b/Fltk/SpherePosition_Widget.h
index 5c35d3cfbaa259134ddf9e65b8b7f171f4be7b65..2187eefe582f02c4c2455d8fa8b0852fa71f9634 100644
--- a/Fltk/SpherePosition_Widget.h
+++ b/Fltk/SpherePosition_Widget.h
@@ -36,9 +36,9 @@ class SpherePosition_Widget : public Fl_Widget {
     int h1 = h() - 6;
     fl_color(FL_FOREGROUND_COLOR);
     fl_arc(x1, y1, w1, h1, 0, 360);
-    int x = int(x1 + 0.5 * w1 * (1 + _x));
-    int y = int(y1 + 0.5 * h1 * (1 - _y));
-    draw_box(FL_UP_BOX, x - 3, y - 3, 6, 6, FL_FOREGROUND_COLOR);
+    int px = int(x1 + 0.5 * w1 * (1 + _x));
+    int py = int(y1 + 0.5 * h1 * (1 - _y));
+    draw_box(FL_UP_BOX, px - 3, py - 3, 6, 6, FL_FOREGROUND_COLOR);
   }
   int handle(int event)
   {
@@ -47,10 +47,10 @@ class SpherePosition_Widget : public Fl_Widget {
     case FL_DRAG:
     case FL_RELEASE: 
       {
-	int x1 = x() + Fl::box_dx(box());
-	int y1 = y() + Fl::box_dy(box());
-	int w1 = w() - Fl::box_dw(box());
-	int h1 = h() - Fl::box_dh(box());
+	int x1 = x() + 3;
+	int y1 = y() + 3;
+	int w1 = w() - 6;
+	int h1 = h() - 6;
 	double xx = (Fl::event_x() - x1) / (0.5 * w1) - 1.;
 	double yy = -((Fl::event_y() - y1) / (0.5 * h1) - 1.);
 	if(xx != _x || yy != _y) {