From: isn Date: Mon, 29 Jun 2015 11:42:41 +0000 (+0300) Subject: Import of landcover: small bug fixes X-Git-Tag: v1.4.2~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec5c5c2a004aa09cfdca75a90a02d56010e3b819;p=modules%2Fhydro.git Import of landcover: small bug fixes --- diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverOp.cxx b/src/HYDROGUI/HYDROGUI_ImportLandCoverOp.cxx index ef7756b1..bbf23d2f 100644 --- a/src/HYDROGUI/HYDROGUI_ImportLandCoverOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportLandCoverOp.cxx @@ -215,18 +215,17 @@ void HYDROGUI_ImportLandCoverOp::onFileSelected() TopTools_SequenceOfShape aFaces; HYDROData_ShapeFile anImporter; - if (anImporter.ImportLandCovers(aFileName, aPolygonsList, aFaces)) - { - aPanel->setPolygonNames(aPolygonsList); + SalomeApp_Study* aStudy = dynamic_cast( module()->getApp()->activeStudy() ); + if ( !aStudy ) + return; - SalomeApp_Study* aStudy = dynamic_cast( module()->getApp()->activeStudy() ); - if ( !aStudy ) { - return; - } + erasePreview(); - erasePreview(); + Handle(AIS_InteractiveContext) aCtx = NULL; - Handle(AIS_InteractiveContext) aCtx = NULL; + if (anImporter.ImportLandCovers(aFileName, aPolygonsList, aFaces)) + { + aPanel->setPolygonNames(aPolygonsList); LightApp_Application* anApp = module()->getApp(); if ( !getPreviewManager() ) @@ -276,7 +275,8 @@ void HYDROGUI_ImportLandCoverOp::onFileSelected() SUIT_MessageBox::warning( module()->getApp()->desktop(), tr( "IMPORT_LANDCOVER" ), "Cannot import land cover;\nThe shape type is not polygon" ); QApplication::restoreOverrideCursor(); - abort(); + commitDocOperation(); + //abort(); } anImporter.Free();