From 058069d7b3e9aa5ed84777f1b56f625d52f97b1e Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 12 Jan 2010 10:31:40 +0000
Subject: [PATCH] save onWhat() as vertex tag in .mesh format

---
 Fltk/menuWindow.cpp | 2 +-
 Geo/MVertex.cpp     | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp
index 8ee4fad370..9754e96a35 100644
--- a/Fltk/menuWindow.cpp
+++ b/Fltk/menuWindow.cpp
@@ -2511,7 +2511,7 @@ contextItem menu_mesh[] = {
     {"1Mesh>Define"} ,
     {"Fields",      (Fl_Callback *)field_cb},
     {"Characteristic length", (Fl_Callback *)mesh_define_length_cb  } ,
-    {"Embedded point", (Fl_Callback *)mesh_define_embedded_cb, (void*)"point" } ,
+    {"Embedded points", (Fl_Callback *)mesh_define_embedded_cb, (void*)"point" } ,
     {"Recombine",   (Fl_Callback *)mesh_define_recombine_cb  } ,
     {"Transfinite", (Fl_Callback *)mesh_define_transfinite_cb  } , 
     {""} 
diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp
index 726baf39bf..3918196fa7 100644
--- a/Geo/MVertex.cpp
+++ b/Geo/MVertex.cpp
@@ -154,7 +154,8 @@ void MVertex::writeMESH(FILE *fp, double scalingFactor)
   if(_index < 0) return; // negative index vertices are never saved
 
   fprintf(fp, " %20.14G      %20.14G      %20.14G      %d\n", 
-          x() * scalingFactor, y() * scalingFactor, z() * scalingFactor, _index);
+          x() * scalingFactor, y() * scalingFactor, z() * scalingFactor, 
+          _ge ? _ge->tag() : 0);
 }
 
 static void double_to_char8(double val, char *str)
-- 
GitLab