Salome HOME
Add tests.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportGeomObjectOp.cxx
index 60b0384b00a233f824e00ef3eeebc3781e3cf04d..7832f3b35dc8fe796c58453b128c849ffaff22b7 100644 (file)
@@ -215,11 +215,12 @@ bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags,
           Handle(HYDROData_Obstacle) anObstacle = Handle(HYDROData_Obstacle)::DownCast( anObject );
           anObstacle->SetFillingColor( HYDROData_Obstacle::DefaultFillingColor() );
           anObstacle->SetBorderColor( HYDROData_Obstacle::DefaultBorderColor() );
-          anObstacle->SetGeomObjectEntry( anEntry );
+          anObstacle->SetGeomObjectEntry( anEntry.toLatin1().constData() );
         } else if ( myOpType == ImportSelectedAsPolyline ) {
           anObject = doc()->CreateObject( KIND_POLYLINEXY );
           Handle(HYDROData_PolylineXY) aPolylineObj = Handle(HYDROData_PolylineXY)::DownCast( anObject );
           aPolylineObj->SetWireColor( HYDROData_PolylineXY::DefaultWireColor() );
+          aPolylineObj->SetGeomObjectEntry( anEntry.toLatin1().constData() );
         }
       } else {
         anObject = anObjectToEdit;
@@ -329,6 +330,9 @@ void HYDROGUI_ImportGeomObjectOp::onExternalOperationFinished(
 
   // Update the default name of the HYDRO object
   updateDefaultName();
+
+  // Close the dialog corresponding to the external operation
+  closeExternalOperationDlg();
 }
 
 void HYDROGUI_ImportGeomObjectOp::closeExternalOperationDlg()