]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Merge branch 'BR_LAND_COVER_MAP' into HEAD
authorisn <isn@opencascade.com>
Fri, 13 Nov 2015 10:55:20 +0000 (13:55 +0300)
committerisn <isn@opencascade.com>
Fri, 13 Nov 2015 10:55:20 +0000 (13:55 +0300)
1  2 
src/HYDROData/HYDROData_LandCoverMap.cxx
src/HYDROData/HYDROData_LandCoverMap.h
src/HYDROData/HYDROData_ShapeFile.cxx
src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx
src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx

index 969ce6d077423bc7f159fe8fedc31d29dfa19c82,9df53033988a5f9b7406934b9ef22bd7db23971c..acecb291048c49fb751a704701cbe9a6cba5b0d0
@@@ -942,3 -928,23 +943,23 @@@ TopoDS_Shape HYDROData_LandCoverMap::Re
    return sfs->Shape();
  
  }
 -}
+ void HYDROData_LandCoverMap::SetTransparency( double theTransparency )
+ {
+   Handle(TDataStd_Real) anAttr;
+   TDF_Label aLabel = myLab.FindChild( DataTag_Transparency );
+   if( !aLabel.FindAttribute( TDataStd_Real::GetID(), anAttr ) )
+     aLabel.AddAttribute( anAttr = new TDataStd_Real() );
+   anAttr->Set( theTransparency );
+ }
+ double HYDROData_LandCoverMap::GetTransparency() const
+ {
+   Handle(TDataStd_Real) anAttr;
+   TDF_Label aLabel = myLab.FindChild( DataTag_Transparency );
+   if( !aLabel.FindAttribute( TDataStd_Real::GetID(), anAttr ) )
+     return 0.5;
+   return anAttr->Get();
+   
++}
Simple merge
index 51c128188ebd474d5ec0a8a45787c6ef4d060510,0afe0e31f9f880e7c544f5985d5390c2945f7388..dc04adb87eb93cca268e372b7463d3f18883ec08
@@@ -59,9 -59,12 +59,12 @@@ void HYDROGUI_LandCoverMapPrs::SetLandC
  
  void HYDROGUI_LandCoverMapPrs::UpdateColors()
  {
+   if( !myLCMap.IsNull() )
+     SetTransparency( myLCMap->GetTransparency() );
    Set( myLCMap->GetShape() );
    SetMaterial( Graphic3d_NOM_PLASTIC );
 -  HYDROData_LandCoverMap::Iterator anIt( myLCMap );
 +  HYDROData_LandCoverMap::Explorer anIt( myLCMap );
    for( ; anIt.More(); anIt.Next() )
    {
      TopoDS_Face aFace = anIt.Face();