Salome HOME
refs #1278: by default objects in study are not expanded
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportGeomObjectOp.cxx
index 9f96556319bd30cbd66745ade252df1616331752..381a78c1d9beb1cc13851e076b3f7bdf8926c660 100644 (file)
@@ -23,6 +23,7 @@
 #include "HYDROGUI_DataModel.h"
 #include "HYDROGUI_Module.h"
 #include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Tool2.h"
 #include "HYDROGUI_UpdateFlags.h"
 
 #include <HYDROData_Obstacle.h>
@@ -210,8 +211,8 @@ bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags,
         if ( myOpType == ImportCreatedAsObstacle || myOpType == ImportSelectedAsObstacle ) {
           anObject = doc()->CreateObject( KIND_OBSTACLE );
           Handle(HYDROData_Obstacle) anObstacle = Handle(HYDROData_Obstacle)::DownCast( anObject );
-          anObstacle->SetFillingColor( HYDROData_Obstacle::DefaultFillingColor() );
-          anObstacle->SetBorderColor( HYDROData_Obstacle::DefaultBorderColor() );
+          anObstacle->SetFillingColor( anObstacle->DefaultFillingColor() );
+          anObstacle->SetBorderColor( anObstacle->DefaultBorderColor() );
           anObstacle->SetGeomObjectEntry( anEntry.toLatin1().constData() );
         } else if ( myOpType == ImportSelectedAsPolyline ) {
           anObject = doc()->CreateObject( KIND_POLYLINEXY );
@@ -242,7 +243,7 @@ bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags,
         anIsOk = true;
       } else if ( myOpType == ImportSelectedAsPolyline ) {
         Handle(HYDROData_PolylineXY) aPolyline = Handle(HYDROData_PolylineXY)::DownCast( anObject );
-        anIsOk = aPolyline->ImportShape( aShape );
+        anIsOk = aPolyline->ImportShape( aShape, false, NULL );
 
         /* TODO: check it before start operation
         if ( anIsOk && !aPolyline->IsEditable() )
@@ -369,4 +370,4 @@ QList<GEOM::shape_type> HYDROGUI_ImportGeomObjectOp::getPolylineTypes()
   aTypes << GEOM::WIRE << GEOM::EDGE;
 
   return aTypes;
-}
\ No newline at end of file
+}