Salome HOME
Channel and digue objects creation improved to do not use the transaction during...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportGeomObjectOp.cxx
index 8715e91892218fb6aea602f57c3a7ce6b251bd9a..7832f3b35dc8fe796c58453b128c849ffaff22b7 100644 (file)
@@ -215,10 +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.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;
@@ -261,7 +263,8 @@ bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags,
       // Check operation status
       if ( anIsOk ) {
         anObject->Update();
-        theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced;
+        module()->setIsToUpdate( anObject );
+        theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer;
       }
     }
   }
@@ -327,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()