From: apo Date: Thu, 17 May 2007 07:05:39 +0000 (+0000) Subject: Fix for Bug IPAL15173 X-Git-Tag: mergeto_BR_Dev_For_4_0_21May07~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3cec0300c4bc24f197557f02958dac4b37eb045d;p=modules%2Fvisu.git Fix for Bug IPAL15173 - IOLS.3D Cache Sysytem item in Object Browser does not save when Dump Study. (restored the lost code) --- diff --git a/src/VISU_I/VISU_DumpPython.cc b/src/VISU_I/VISU_DumpPython.cc index 49736c11..30742d9d 100644 --- a/src/VISU_I/VISU_DumpPython.cc +++ b/src/VISU_I/VISU_DumpPython.cc @@ -41,6 +41,8 @@ #include "VISU_Table_i.hh" #include "VISU_GaussPoints_i.hh" #include "VISU_ScalarMapOnDeformedShape_i.hh" +#include "VISU_ColoredPrs3dCache_i.hh" +#include "VISU_ColoredPrs3dHolder_i.hh" #include "utilities.h" @@ -59,6 +61,8 @@ namespace VISU { static std::string PREFIX(" "); + static std::string aResultName; + typedef std::map TName2EntryMap; typedef std::map TEntry2NameMap; @@ -534,6 +538,7 @@ namespace VISU switch(aType){ case VISU::TRESULT: if(Result_i* aServant = dynamic_cast(GetServant(anObj).in())){ + aResultName = aName; std::string aFileName = aServant->GetFileName(); Result_i::ECreationId anId = aServant->GetCreationId(); if(anId == Result_i::eImportFile || anId == Result_i::eCopyAndImportFile){ @@ -1111,6 +1116,36 @@ namespace VISU } } return; + case VISU::TCOLOREDPRS3DCACHE: + if(ColoredPrs3dCache_i* aServant = dynamic_cast(GetServant(anObj).in())){ + theStr<GetHolderMap(); + TColoredPrs3dHolderMap::const_iterator aHolderIter = aHolderMap.begin(); + TColoredPrs3dHolderMap::const_iterator aHolderIterEnd = aHolderMap.end(); + for(; aHolderIter != aHolderIterEnd; aHolderIter++){ + const TLastVisitedPrsList& aPrsList = aHolderIter->second; + if(TPrs3dPtr aPrs3d = aPrsList.front()) + { + ColoredPrs3dHolder::BasicInput_var anInput = aPrs3d->GetBasicInput(); + + std::string anEntity; + switch(anInput->myEntity){ + case VISU::NODE : anEntity = "VISU.NODE"; break; + case VISU::EDGE : anEntity = "VISU.EDGE"; break; + case VISU::FACE : anEntity = "VISU.FACE"; break; + case VISU::CELL : anEntity = "VISU.CELL"; break; + } + + theStr<myMeshName<<"',"<myFieldName<<"',"<myTimeStampNumber<<")"<GetComment(); + theStr<