From 2ede7dee9c613c7e651040cf8e26b5fad4f74be4 Mon Sep 17 00:00:00 2001
From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be>
Date: Fri, 27 Jun 2008 10:09:19 +0000
Subject: [PATCH] *** empty log message ***

---
 Post/PViewData.h         |  2 +-
 Post/PViewDataListIO.cpp | 13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Post/PViewData.h b/Post/PViewData.h
index db1bd9a8d8..5e01ed472e 100644
--- a/Post/PViewData.h
+++ b/Post/PViewData.h
@@ -43,9 +43,9 @@ class PViewData {
   std::string _fileName;
   // index of the view in the file
   int _fileIndex;
+ protected:
   // adaptive visualization data
   adaptiveData *_adaptive;
- protected:
   // interpolation matrices, indexed by the number of edges per
   // element (1 for lines, 3 for triangles, etc.)
   std::map<int, std::vector<List_T*> > _interpolation;
diff --git a/Post/PViewDataListIO.cpp b/Post/PViewDataListIO.cpp
index 5e13913558..a15e76481a 100644
--- a/Post/PViewDataListIO.cpp
+++ b/Post/PViewDataListIO.cpp
@@ -1,4 +1,4 @@
-// $Id: PViewDataListIO.cpp,v 1.20 2008-05-04 08:31:24 geuzaine Exp $
+// $Id: PViewDataListIO.cpp,v 1.21 2008-06-27 10:09:19 remacle Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -28,6 +28,7 @@
 #include "Numeric.h"
 #include "Message.h"
 #include "Context.h"
+#include "adaptiveData.h"
 
 extern Context_T CTX;
 
@@ -318,6 +319,11 @@ static void writeTextPOS(FILE *fp, int nbc, int nb, List_T *TD, List_T *TC)
 
 bool PViewDataList::writePOS(std::string fileName, bool binary, bool parsed, bool append)
 {
+
+  if ( _adaptive ){
+    return _adaptive->getData()->writePOS (fileName,binary,parsed,append);
+  }
+
   FILE *fp = fopen(fileName.c_str(), 
                    append ? (binary ? "ab" : "a") : (binary ? "wb" : "w"));
   if(!fp){
@@ -338,7 +344,10 @@ bool PViewDataList::writePOS(std::string fileName, bool binary, bool parsed, boo
 
   if(!parsed){
     fprintf(fp, "$View /* %s */\n", getName().c_str());
-    fprintf(fp, "%s ", str);
+    if (strlen(str) == 0)
+      fprintf(fp, "noname ");
+    else
+      fprintf(fp, "%s ", str);
     fprintf(fp, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d "
             "%d %d %d %d %d %d %d %d %d %d %d %d\n",
             List_Nbr(Time),
-- 
GitLab