X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_LandCoverOp.cxx;h=00b32548846d5db87d1f9a82b87997da5af6e189;hb=c05c4247149cedfb50ed442645781e960bd0cc51;hp=5240b42d86bdcbdbcd2879078db995073d854b55;hpb=d6e19029f8b41f295db878e9aecf451c2edda4af;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx b/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx index 5240b42d..00b32548 100644 --- a/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx +++ b/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx @@ -189,17 +189,25 @@ bool HYDROGUI_LandCoverOp::processApply( int& theUpdateFlags, } } + if ( aZonePolylines.IsEmpty() ) + { + theErrorMsg = tr( "POLYLINES_NOT_DEFINED" ); + return false; + } + QString aSelectedStricklerType = aPanel->getSelectedAdditionalParamName(); - // TODO: Generate TopoDS_Shape based on the set of polylines, implement generateTopShape data model method - /* - if ( HYDROData_LandCover::generateTopShape( aZonePolylines ).IsNull() ) + TCollection_AsciiString anError; + if ( HYDROData_LandCover::buildShape( aZonePolylines, anError ).IsNull() ) { - theErrorMsg = tr( "ZONE_OBJECT_CANNOT_BE_CREATED" ); + if ( !anError.IsEmpty() ) { + theErrorMsg = HYDROGUI_Tool::ToQString( anError ); + } else { + theErrorMsg = tr( "LAND_COVER_OBJECT_CANNOT_BE_CREATED" ); + } return false; } - */ - + Handle(HYDROData_LandCover) aZoneObj = myIsEdit ? myEditedObject : Handle(HYDROData_LandCover)::DownCast( doc()->CreateObject( KIND_LAND_COVER ) );