TopTools_SequenceOfShape aFaces;
HYDROData_ShapeFile anImporter;
- if (anImporter.ImportLandCovers(aFileName, aPolygonsList, aFaces))
- {
- aPanel->setPolygonNames(aPolygonsList);
+ SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( module()->getApp()->activeStudy() );
+ if ( !aStudy )
+ return;
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( 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() )
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();