From ef6060ac8a5662aaa020209d72ab167b8aefad76 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 7 Sep 2006 04:54:55 +0000 Subject: [PATCH] fix crash when adding a geo entity while a mesh is displayed --- Geo/Makefile | 7 +++++-- Geo/gmshModel.cpp | 6 +++++- Mesh/Makefile | 14 +++++++++++++- Parser/OpenFile.cpp | 4 ++-- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Geo/Makefile b/Geo/Makefile index d6538de861..3449e24c21 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.99 2006-08-26 13:34:46 geuzaine Exp $ +# $Id: Makefile,v 1.100 2006-09-07 04:54:55 geuzaine Exp $ # # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle # @@ -235,7 +235,10 @@ fourierModel.o: fourierModel.cpp fourierModel.h GModel.h GVertex.h \ GEntity.h Range.h SPoint3.h SBoundingBox3d.h ../Common/GmshDefines.h \ MVertex.h GPoint.h GEdge.h SVector3.h SPoint2.h MElement.h MEdge.h \ MFace.h ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \ - GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h ../Common/Message.h + GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h ../Common/Message.h \ + ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ + ../Common/SmoothNormals.h ../Common/AdaptiveViews.h \ + ../Common/GmshMatrix.h # 1 "/Users/geuzaine/.gmsh/Geo//" SVector3.o: SVector3.cpp SVector3.h SPoint3.h # 1 "/Users/geuzaine/.gmsh/Geo//" diff --git a/Geo/gmshModel.cpp b/Geo/gmshModel.cpp index 2f15a650eb..d5586ec0a5 100644 --- a/Geo/gmshModel.cpp +++ b/Geo/gmshModel.cpp @@ -1,4 +1,4 @@ -// $Id: gmshModel.cpp,v 1.15 2006-08-27 16:35:22 geuzaine Exp $ +// $Id: gmshModel.cpp,v 1.16 2006-09-07 04:54:55 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -24,12 +24,14 @@ #include "Geo.h" #include "Tools.h" #include "Message.h" +#include "Context.h" #include "gmshVertex.h" #include "gmshFace.h" #include "gmshEdge.h" #include "gmshRegion.h" extern Mesh *THEM; +extern Context_T CTX; void gmshModel::import() { @@ -120,4 +122,6 @@ void gmshModel::import() Msg(DEBUG, "%d Edges", edges.size()); Msg(DEBUG, "%d Faces", faces.size()); Msg(DEBUG, "%d Regions", regions.size()); + + CTX.mesh.changed = ENT_ALL; } diff --git a/Mesh/Makefile b/Mesh/Makefile index 0e79b693dc..78b0288b0e 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.129 2006-09-05 21:37:59 remacle Exp $ +# $Id: Makefile,v 1.130 2006-09-07 04:54:55 geuzaine Exp $ # # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle # @@ -435,6 +435,18 @@ meshGFace.o: meshGFace.cpp meshGFace.h ../Geo/GVertex.h ../Geo/GEntity.h \ ../Common/SmoothNormals.h ../Common/AdaptiveViews.h \ ../Common/GmshMatrix.h # 1 "/Users/geuzaine/.gmsh/Mesh//" +meshGFaceTransfinite.o: meshGFaceTransfinite.cpp meshGFace.h \ + ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ + ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ + ../Geo/MVertex.h ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/GEdge.h \ + ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ + ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \ + ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \ + ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h \ + ../Common/Context.h ../DataStr/List.h ../Geo/GFace.h ../Geo/GPoint.h \ + ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \ + ../Geo/Pair.h ../Common/Message.h +# 1 "/Users/geuzaine/.gmsh/Mesh//" meshGRegion.o: meshGRegion.cpp meshGRegion.h ../Geo/GRegion.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp index a2b23531c1..214c2fbfd9 100644 --- a/Parser/OpenFile.cpp +++ b/Parser/OpenFile.cpp @@ -1,4 +1,4 @@ -// $Id: OpenFile.cpp,v 1.121 2006-09-03 07:44:10 geuzaine Exp $ +// $Id: OpenFile.cpp,v 1.122 2006-09-07 04:54:55 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -340,7 +340,7 @@ int MergeProblem(char *name, int warn_if_missing) GMODEL->import(); SetBoundingBox(); - CTX.mesh.changed = ENT_ALL; + Msg(STATUS2, "Read '%s'", name); return status; } -- GitLab