Salome HOME
Merge remote-tracking branch 'origin/BR_1321_ECW' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Zone.cxx
index c1139e1e4e66153e03a82a6dddabb20245e7f8d7..6da859d9a4ede9ff32f9f022bd03304fe2aef58d 100644 (file)
@@ -21,7 +21,6 @@
 #include <HYDROData_Zone.h>
 #include <HYDROData_Object.h>
 #include <HYDROData_IAltitudeObject.h>
-#include <HYDROData_LandCover.h>
 
 #include <SUIT_DataObject.h>
 #include <QSet>
@@ -66,8 +65,7 @@ QString HYDROGUI_Zone::getRefObjectNames() const
     HYDROData_SequenceOfObjects::Iterator anIter( aSeq );
     for ( ; anIter.More(); anIter.Next() )
     {
-      Handle(HYDROData_Entity) aRefGeomObj =
-        Handle(HYDROData_Entity)::DownCast( anIter.Value() );
+      Handle(HYDROData_Entity) aRefGeomObj = anIter.Value();
       if ( !aRefGeomObj.IsNull() )
       {
         // Get Ref.Object name
@@ -119,22 +117,6 @@ QString HYDROGUI_Zone::getObjectName() const
             }
           }
         }
-        else
-        {
-          Handle(HYDROData_LandCover) aRefLandCoverObj =
-            Handle(HYDROData_LandCover)::DownCast( anIter.Value() );
-          if ( !aRefLandCoverObj.IsNull() )
-          {
-            // Get name of land cover object
-            aName = aRefLandCoverObj->GetName();
-            if ( !isMergingNeed )
-            {
-              // Get the first land cover object's altitude name and go out
-              aRes = aName;
-              break;
-            }
-          }        
-        }
 
         if ( !aName.isEmpty() && !aNamesSet.contains( aName ) )
         {
@@ -281,8 +263,6 @@ void HYDROGUI_Zone::setMergeType( int theMergeType, QString theMergeObjectName )
         {
           // Get altitude object
           aMergeObject = aRefGeomObj->GetAltitudeObject();
-        } else {
-          aMergeObject = Handle(HYDROData_LandCover)::DownCast( anIter.Value() );
         }
 
         if ( !aMergeObject.IsNull() && theMergeObjectName == aMergeObject->GetName() )