From ec5c5c2a004aa09cfdca75a90a02d56010e3b819 Mon Sep 17 00:00:00 2001 From: isn Date: Mon, 29 Jun 2015 14:42:41 +0300 Subject: [PATCH] Import of landcover: small bug fixes --- src/HYDROGUI/HYDROGUI_ImportLandCoverOp.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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(); -- 2.39.2