Salome HOME
17.12.2013. Added Partition algorithm (draft version).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportObstacleFromFileOp.cxx
index 0fc2e3e58fd7a0720cd868538cea38ee472a1b71..9735ef8a0261bc08f87e5b03ae3c42ba56e6eb39 100644 (file)
@@ -154,6 +154,9 @@ bool HYDROGUI_ImportObstacleFromFileOp::processApply( int& theUpdateFlags,
   // If the obstacle for edit is null - create new obstacle object
   if ( anObstacle.IsNull() ) {
     anObstacle = Handle(HYDROData_Obstacle)::DownCast( doc()->CreateObject(KIND_OBSTACLE) );
+
+    anObstacle->SetFillingColor( HYDROData_Obstacle::DefaultFillingColor() );
+    anObstacle->SetBorderColor( HYDROData_Obstacle::DefaultBorderColor() );
   }
 
   if ( !anObstacle.IsNull() ) {
@@ -167,6 +170,8 @@ bool HYDROGUI_ImportObstacleFromFileOp::processApply( int& theUpdateFlags,
         anObstacle->SetName( anObstacleName );
       }
 
+      anObstacle->Update();
+
       // Set operation status
       anIsOk = true;
       theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced;;