From 78a3e0638aaacf1e0c71555100b0ae4b026842ee Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 8 Aug 2011 06:48:07 +0000 Subject: [PATCH] Fix for the BUG "SALOME6.3.1: Bad dump python result in case if study contains Post-Pro table". --- src/VISU_I/VISU_DumpPython.cc | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/VISU_I/VISU_DumpPython.cc b/src/VISU_I/VISU_DumpPython.cc index 2303c455..4fa096cc 100644 --- a/src/VISU_I/VISU_DumpPython.cc +++ b/src/VISU_I/VISU_DumpPython.cc @@ -993,12 +993,14 @@ namespace VISU if ( comma.empty() ) comma = ","; } +/* values << '\0'; rows << '\0'; columns << '\0'; rowUnits << '\0'; rowTitles << '\0'; colTitles << '\0'; +*/ // write FillTable command theStr<< thePrefix << aName << "_values = [" << values.str() << "]" << endl; theStr<< thePrefix << aName << "_rows = [" << rows.str() << "]" << endl; @@ -1483,11 +1485,36 @@ namespace VISU return; case VISU::TPOINTMAP3D: if (PointMap3d_i* aServant = dynamic_cast(GetServant(anObj).in())) { + + SALOMEDS::GenericAttribute_var anAttr; + if(theSObject->FindAttribute(anAttr,"AttributeString")){ + using namespace SALOMEDS; + AttributeString_var aComment = AttributeString::_narrow(anAttr); + CORBA::String_var aValue = aComment->Value(); + Storable::TRestoringMap aMap; + Storable::StringToMap(aValue.in(),aMap); + bool anIsExist; + QString aSourceId = VISU::Storable::FindValue(aMap,"mySourceId",&anIsExist); + if(anIsExist) { + if( aSourceId == "TableAttr" ) { + DumpTableAttrToPython(theStudy, + theIsPublished, + theIsValidScript, + theSObject, + theStr, + theName2EntryMap, + theEntry2NameMap, + theArgumentName, + thePrefix); + } + } + } + CORBA::Short aTag = theSObject->Tag(); - theStr<