X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ImportGeomObjectOp.cxx;h=e8cb3e0328bd6e32262eb90c12842a415e2eab82;hb=81c9f5cdf82909d0aebd2c491c50fa7516cc80b7;hp=a454cd985c7b5d30393d8eaf06fa7ac81aa6b2d0;hpb=a1431f03eac1d1aed4203d0568d987c41ce939b3;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx index a454cd98..e8cb3e03 100644 --- a/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportGeomObjectOp.cxx @@ -23,7 +23,7 @@ #include "HYDROGUI_ImportGeomObjectOp.h" #include "HYDROGUI_GeomObjectDlg.h" - +#include "HYDROGUI_DataObject.h" #include "HYDROGUI_DataModel.h" #include "HYDROGUI_Module.h" #include "HYDROGUI_Tool.h" @@ -145,7 +145,8 @@ void HYDROGUI_ImportGeomObjectOp::commitOperation() } bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags, - QString& theErrorMsg ) + QString& theErrorMsg, + QStringList& theBrowseObjectsEntries ) { // Get active SalomeApp_Study SalomeApp_Study* aStudy = @@ -215,10 +216,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; @@ -262,6 +265,8 @@ bool HYDROGUI_ImportGeomObjectOp::processApply( int& theUpdateFlags, if ( anIsOk ) { anObject->Update(); module()->setIsToUpdate( anObject ); + QString aHydroObjEntry = HYDROGUI_DataObject::dataObjectEntry( anObject ); + theBrowseObjectsEntries.append( aHydroObjEntry ); theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer; } } @@ -328,6 +333,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()