X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ImportLandCoverMapOp.cxx;h=5cb9d9478c73085f4c5aa6accd6cdfabae58dbde;hb=58bb6b7459bebeeb089c9ed486c4683a8bae7288;hp=f40b69a2383616c688aa9d23ed81637d51706af6;hpb=ea1e1782c3738436bfc935b993e32c1070bfd937;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx index f40b69a2..5cb9d947 100644 --- a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx @@ -132,7 +132,7 @@ void HYDROGUI_ImportLandCoverMapOp::onFileSelected() //Import polygons from SHP file as faces //This faces should be added to the new LCM object - int aStat = myImporter.ImportPolygons(myFileName, aPolygonsList, myPolygonFaces, aShapeTypeOfFile); + int aStat = myImporter.ImportPolygons(doc(), myFileName, aPolygonsList, myPolygonFaces, aShapeTypeOfFile); if (aStat == 1) { aPanel->setPolygonNames(aPolygonsList); @@ -262,7 +262,7 @@ bool HYDROGUI_ImportLandCoverMapOp::processApply( int& theUpdateFlags, if ( !aPanel->getFileName().isEmpty() ) anObjName = aPanel->getObjectName(); - Handle_HYDROData_Document aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); + Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); //check if name of LCM is already exists QSet aNameList; @@ -408,7 +408,7 @@ void HYDROGUI_ImportLandCoverMapOp::onNext( const int theIndex ) //Collect all strickler_types QSet aSTSet; - Handle_HYDROData_Document aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); + Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); Handle(HYDROData_StricklerTable) DefStricklerTableObj; if ( aDoc ) { @@ -442,7 +442,7 @@ void HYDROGUI_ImportLandCoverMapOp::onNext( const int theIndex ) aSTColors.prepend(QColor(Qt::gray)); QVector aCurCBIndices(aSetOfAttrValuesList.size()); - if (DefStricklerTableObj->GetAttrName() == aPanel->getSelectedFieldName()) + if (DefStricklerTableObj->GetAttrName().trimmed() == aPanel->getSelectedFieldName().trimmed()) for (int i = 0; i < aSetOfAttrValuesList.size(); i++) { QString aST = DefStricklerTableObj->GetType(aSetOfAttrValuesList[i]); @@ -495,8 +495,7 @@ void HYDROGUI_ImportLandCoverMapOp::onApply() } else { - Handle(HYDROData_Entity) LCM = Handle(HYDROData_Entity)::DownCast( myLCM ); - LCM->Remove(); + myLCM->Remove(); module()->setObjectRemoved( myLCM ); abort(); }