Salome HOME
Mantis issue 0021414: There is a difference between vectors and other edges in Geometry.
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IInsertOperations.cxx
index c2facb98431381c2d4d7e358c391dc673702bdfa..1d262172b1eb76cc6845710510c3ffdc5af9c4e6 100644 (file)
@@ -33,7 +33,7 @@
 #include <GEOM_Function.hxx>
 #include <GEOM_PythonDump.hxx>
 
-#include <CASCatch_OCCTVersion.hxx>
+#include <Basics_OCCTVersion.hxx>
 
 #include "utilities.h"
 #include <OpUtil.hxx>
@@ -150,8 +150,11 @@ void GEOMImpl_IInsertOperations::Export
   Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
   if (aRefFunction.IsNull()) return;  //There is no function which creates an object to be exported
 
+  //Add a new result object
+  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
+
   //Add an Export function
-  Handle(GEOM_Function) aFunction = theOriginal->AddFunction(GEOMImpl_ExportDriver::GetID(), EXPORT_SHAPE);
+  Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_ExportDriver::GetID(), EXPORT_SHAPE);
   if (aFunction.IsNull()) return;
 
   //Check if the function is set correctly