]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix bug 17212: import Structure, Field and TimeStamp don't create a tree in post...
authorjfa <jfa@opencascade.com>
Fri, 2 Nov 2007 12:52:22 +0000 (12:52 +0000)
committerjfa <jfa@opencascade.com>
Fri, 2 Nov 2007 12:52:22 +0000 (12:52 +0000)
src/VISU_I/VISUConfig.cc
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_Result_i.cc

index 8e7eb323ce746bf1eece1932abb5c8dff843551c..31d8a6af97315e0c67fc47892020256aeb53053e 100644 (file)
@@ -632,7 +632,9 @@ namespace VISU
     _PTR(SObject) aFather = theStudyDocument->FindObjectID(theFatherEntry);
     _PTR(SObject) aNewSObject;
     if (theCreateNew)
+    {
       aNewSObject = aStudyBuilder->NewObject(aFather);
+    }
     else
       aNewSObject = aFather;
 
index 034644e174b62c2b55d93db0b299f39781a015e1..60b544ab8147a6396ce96765cb9130e5a0373b9b 100644 (file)
@@ -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();
     
index d7af2d036035ef2b7dc7048affb2477619f187ee..1f67c7367e6b133f3ddcf516a1099498e5bc7ae3 100644 (file)
@@ -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"<<exc.what());