Salome HOME
lots 3,8 - corrections
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportLandCoverMapOp.cxx
index a2d3a09b55c1712992a782b2a07009923d61cb8d..c4a5a0d5f851756953061a3ce8aad9cf2e8f28d3 100644 (file)
@@ -188,6 +188,7 @@ void HYDROGUI_ImportLandCoverMapOp::onFileSelected()
       aPanel->setAttributeNames(myFieldList);
     }
     aPanel->setDbfState(DBF_Stat);
+    aPanel->setDbfRecordsNb(myImporter.DBF_GetNbRecords());
   }
   else
   {
@@ -262,7 +263,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<QString> aNameList;
@@ -310,7 +311,7 @@ void HYDROGUI_ImportLandCoverMapOp::onSelectionChanged( const QStringList& theSe
     foreach ( QString aName, myPolygonName2PrsShape.keys() ) 
     {
       Handle(AIS_InteractiveObject) anObject = 
-        myPolygonName2PrsShape.value(aName)->getAISObject();
+        myPolygonName2PrsShape.value(aName)->getAISObjects()[0];
 
       bool isSelected = theSelectedNames.contains( aName );
       if ( ( isSelected && !aCtx->IsSelected( anObject) ) || ( !isSelected && aCtx->IsSelected( anObject) ) )
@@ -352,7 +353,7 @@ void HYDROGUI_ImportLandCoverMapOp::onViewerSelectionChanged()
   {
     QStringList aSelectedNames;
     foreach ( QString aName, myPolygonName2PrsShape.keys() ) {
-      bool isSelected = aCtx->IsSelected( myPolygonName2PrsShape.value(aName)->getAISObject() );
+      bool isSelected = aCtx->IsSelected( myPolygonName2PrsShape.value(aName)->getAISObjects()[0] );
       if ( isSelected )
         aSelectedNames << aName;
     }
@@ -408,7 +409,7 @@ void HYDROGUI_ImportLandCoverMapOp::onNext( const int theIndex )
 
     //Collect all strickler_types
     QSet<QString> 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 )
     {
@@ -495,8 +496,7 @@ void HYDROGUI_ImportLandCoverMapOp::onApply()
   }
   else
   {
-    Handle(HYDROData_Entity) LCM = Handle(HYDROData_Entity)::DownCast( myLCM );
-    LCM->Remove();
+    myLCM->Remove();
     module()->setObjectRemoved( myLCM );
     abort();
   }