From: eap Date: Thu, 10 Nov 2005 12:37:59 +0000 (+0000) Subject: PAL5887. In Restore(), create field convertor for imported timestamp X-Git-Tag: V3_1_0a3~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8b94c014c40d35d4fb6e2566d3d770699b80767e;p=modules%2Fvisu.git PAL5887. In Restore(), create field convertor for imported timestamp --- 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 {