From: jfa Date: Thu, 2 Mar 2006 14:20:01 +0000 (+0000) Subject: Fix for bug 10040: 'Dump study' doesn't restore name of Prs in Post-Pro. X-Git-Tag: mergeto_trunk_13Mar06~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f4d6eca6103554e85a608429598e383b6d71ad10;p=modules%2Fvisu.git Fix for bug 10040: 'Dump study' doesn't restore name of Prs in Post-Pro. --- diff --git a/src/VISU_I/VISU_DumpPython.cc b/src/VISU_I/VISU_DumpPython.cc index 91b8ef80..79fb6e44 100644 --- a/src/VISU_I/VISU_DumpPython.cc +++ b/src/VISU_I/VISU_DumpPython.cc @@ -175,8 +175,14 @@ namespace VISU{ theStr<Object map theStr<GetName(); + theStr<GetScalarMode()<<")"<GetScaling()){ @@ -359,6 +365,10 @@ namespace VISU{ theStr<GetName(); + theStr<Object map theStr<GetName(); + theStr<GetCellColor(); theStr<(GetServant(anObj).in())){ - SALOMEDS::SObject_var aSObject = aServant->GetSObject(); SALOMEDS::GenericAttribute_var anAttr; if(theSObject->FindAttribute(anAttr,"AttributeComment")){ using namespace SALOMEDS; @@ -921,6 +936,11 @@ namespace VISU{ theStr<GetName(); + theStr<GetName(); + theStr<FindAttribute(anAttr,"AttributeComment")){ SALOMEDS::AttributeComment_var aComment = @@ -1117,6 +1142,10 @@ namespace VISU{ std::string aPrefix = thePrefix + PREFIX; theArgumentName = aName; + // Set name (as this object could be renamed by user) + CORBA::String_var aNameInStudy = aSObject->GetName(); + theStr<NewChildIterator(aSObject); for(aCurveIter->InitEx(false); aCurveIter->More(); aCurveIter->Next()){ SALOMEDS::SObject_var aRefSObj = aCurveIter->Value(); diff --git a/src/VISU_SWIG/visu.py b/src/VISU_SWIG/visu.py index 4b7b4420..ea05e2bf 100644 --- a/src/VISU_SWIG/visu.py +++ b/src/VISU_SWIG/visu.py @@ -81,6 +81,12 @@ def PublishComponent(theStudyDocument): pass return aSComponent; + +def SetName(theObj, theName): + anIOR = myORB.object_to_string(theObj) + aSObj = myLocalStudy.FindObjectIOR(anIOR) + anAttr = aSObj.FindAttribute("AttributeName")[1] + anAttr.SetValue(theName) def StrToMap(theString) : aPairList = split(theString,";")