From 7f68a69b7e01c483d7c575e9369ab15d8ded183d Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 2 Nov 2007 12:52:22 +0000 Subject: [PATCH] Fix bug 17212: import Structure, Field and TimeStamp don't create a tree in post-pro. --- src/VISU_I/VISUConfig.cc | 2 ++ src/VISU_I/VISU_Gen_i.cc | 6 +++--- src/VISU_I/VISU_Result_i.cc | 11 +++++------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/VISU_I/VISUConfig.cc b/src/VISU_I/VISUConfig.cc index 8e7eb323..31d8a6af 100644 --- a/src/VISU_I/VISUConfig.cc +++ b/src/VISU_I/VISUConfig.cc @@ -632,7 +632,9 @@ namespace VISU _PTR(SObject) aFather = theStudyDocument->FindObjectID(theFatherEntry); _PTR(SObject) aNewSObject; if (theCreateNew) + { aNewSObject = aStudyBuilder->NewObject(aFather); + } else aNewSObject = aFather; diff --git a/src/VISU_I/VISU_Gen_i.cc b/src/VISU_I/VISU_Gen_i.cc index 034644e1..60b544ab 100644 --- a/src/VISU_I/VISU_Gen_i.cc +++ b/src/VISU_I/VISU_Gen_i.cc @@ -681,9 +681,7 @@ namespace VISU //---------------------------------------------------------------------------- - Result_ptr - VISU_Gen_i - ::ImportMed(SALOMEDS::SObject_ptr theMedSObject) + Result_ptr VISU_Gen_i::ImportMed(SALOMEDS::SObject_ptr theMedSObject) { if (myStudyDocument->GetProperties()->IsLocked()) return Result::_nil(); @@ -696,7 +694,9 @@ namespace VISU true, true); if (aResult->Create(theMedSObject) != NULL) + { return aResult->_this(); + } else aResult->_remove_ref(); diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index d7af2d03..1f67c736 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -377,10 +377,8 @@ VISU::Result_i //--------------------------------------------------------------- -VISU::Storable* -VISU::Result_i -::Build(SALOMEDS::SObject_ptr theSObject, - CORBA::Boolean theIsAtOnce) +VISU::Storable* VISU::Result_i::Build(SALOMEDS::SObject_ptr theSObject, + CORBA::Boolean theIsAtOnce) { if(!myInput) return NULL; @@ -558,10 +556,11 @@ VISU::Result_i string aCompDataType = GetComponentDataType(theMedSObject); myFileInfo.setFile(aCompDataType.c_str()); - SetInitFileName(aCompDataType); - myFileName = VISU::GenerateName("aResult").latin1(); + SetInitFileName(aCompDataType); + SetName(VISU::GenerateName(myFileInfo.fileName()).latin1(), false); + return Build(theMedSObject); }catch(std::exception& exc){ INFOS("Follow exception was occured :\n"<