diff --git a/Common/Context.h b/Common/Context.h index f5a3dfeb0a4efe646d14089ab90d85a64c6a8189..915c2c33bef37fd6861b46253c3df4d3f6073ef5 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -145,7 +145,7 @@ public : int points_num, lines_num, surfaces_num, volumes_num; double point_size, line_width, point_sel_size, line_sel_width; int point_type, line_type; // flat or 3D - int light; + int draw, light; int old_circle, circle_points; int extrude_spline_points, old_newreg; double normals, tangents; diff --git a/Common/Options.cpp b/Common/Options.cpp index 5b3e749d16e5f6a6a412c20019a3aeba3dd19c9f..0899e896046ccfa2e15fb5e5cfd6ae2506d8797d 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.314 2006-11-02 17:24:53 geuzaine Exp $ +// $Id: Options.cpp,v 1.315 2006-11-22 02:39:17 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -135,6 +135,7 @@ void Init_Options(int num) CTX.mesh_timer[0] = CTX.mesh_timer[1] = CTX.mesh_timer[2] = 0.; CTX.draw_rotation_center = 0; CTX.pick_elements = 0; + CTX.geom.draw = 1; CTX.mesh.draw = 1; CTX.post.draw = 1; CTX.post.list = NULL; diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 3003a4742ab5723f53fd4b52fb9d6ceb10a4003c..5302b3943997181761b4bb00f6a36141bb7d133e 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.561 2006-11-07 19:47:12 geuzaine Exp $ +// $Id: GUI.cpp,v 1.562 2006-11-22 02:39:17 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -1351,11 +1351,7 @@ void GUI::create_graphic_window() bottom->box(FL_FLAT_BOX); int x = 2; -#if defined(WIN32) - int sht = sh - 2; // go all the way to the bottom of the window -#else int sht = sh - 4; // leave a 2 pixel border at the bottom -#endif g_status_butt[0] = new Fl_Button(x, glheight + 2, sw, sht, "X"); x += sw; @@ -1427,9 +1423,6 @@ void GUI::create_graphic_window() x += 2; int wleft = (width - x) / 3 - 1; int wright = (width - x) - (width - x) / 3 - 1; -#if defined(WIN32) - wright += 1; // go right up to the right edge of the window -#endif g_status_label[0] = new Fl_Box(x, glheight + 2, wleft, sht); g_status_label[1] = new Fl_Box(x + (width - x) / 3, glheight + 2, wright, sht); diff --git a/Graphics/Geom.cpp b/Graphics/Geom.cpp index b40f1811939e92c5bc0512b8a52735c0ae2fe19a..b2b48d3db15fd151e3e4c2acb96c49155044e1a8 100644 --- a/Graphics/Geom.cpp +++ b/Graphics/Geom.cpp @@ -1,4 +1,4 @@ -// $Id: Geom.cpp,v 1.122 2006-11-14 17:11:33 remacle Exp $ +// $Id: Geom.cpp,v 1.123 2006-11-22 02:39:18 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -404,6 +404,8 @@ class drawGRegion { void Draw_Geom() { + if(!CTX.geom.draw) return; + glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); for(int i = 0; i < 6; i++) diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp index 9ea560562025228ecf71a713f73f0d9db761fb7a..3c8dd3e83a4ebc7804de56632a2774757f79e71a 100644 --- a/Parser/OpenFile.cpp +++ b/Parser/OpenFile.cpp @@ -1,4 +1,4 @@ -// $Id: OpenFile.cpp,v 1.128 2006-11-21 23:03:13 geuzaine Exp $ +// $Id: OpenFile.cpp,v 1.129 2006-11-22 02:39:18 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -289,6 +289,7 @@ int MergeProblem(char *name, int warn_if_missing) } #endif + CTX.geom.draw = 0; // don't try to draw the model while reading int status = 0; if(!strcmp(ext, ".stl") || !strcmp(ext, ".STL")){ status = GMODEL->readSTL(name, CTX.mesh.stl_distance_tol); @@ -343,6 +344,7 @@ int MergeProblem(char *name, int warn_if_missing) #endif #endif else { + CTX.geom.draw = 1; if(!strncmp(header, "$PTS", 4) || !strncmp(header, "$NO", 3) || !strncmp(header, "$PARA", 5) || !strncmp(header, "$ELM", 4) || !strncmp(header, "$MeshFormat", 11)) { @@ -359,6 +361,7 @@ int MergeProblem(char *name, int warn_if_missing) SetBoundingBox(); + CTX.geom.draw = 1; CTX.mesh.changed = ENT_ALL; Msg(STATUS2, "Read '%s'", name);