From 8b94c014c40d35d4fb6e2566d3d770699b80767e Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 10 Nov 2005 12:37:59 +0000 Subject: [PATCH] PAL5887. In Restore(), create field convertor for imported timestamp --- src/VISU_I/VISU_Result_i.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 15cf901e..167c412b 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -543,8 +543,15 @@ Restore(SALOMEDS::SObject_ptr theSObject, SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder(); SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(aEngComp); aStudyBuilder->LoadWith(aCompRefSObj, aDriver); - if (strcmp(aDataType, "MED") == 0) - myInput = CreateMEDConvertor(aTargetRefSObj); + if (strcmp(aDataType, "MED") == 0) { + // create field or MED converter + CORBA::Object_var aMedObject = VISU::SObjectToObject(aTargetRefSObj); + SALOME_MED::FIELD_var aField = SALOME_MED::FIELD::_narrow(aMedObject); + if(!CORBA::is_nil(aField)) + myInput = CreateMEDFieldConvertor(aField); + else + myInput = CreateMEDConvertor(aTargetRefSObj); + } else throw std::runtime_error("GetInput - There is no convertor for the aDataType !!!"); } else { -- 2.39.2