]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
corrections
authorisn <isn@opencascade.com>
Fri, 13 Nov 2015 11:36:04 +0000 (14:36 +0300)
committerisn <isn@opencascade.com>
Fri, 13 Nov 2015 11:51:00 +0000 (14:51 +0300)
src/HYDROGUI/HYDROGUI_ExportFileOp.cxx
src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/TestViewer.h
src/HYDRO_tests/reference_data/lcm_poly_2_sections.png
src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx

index 02f6b2dfe057f6fd049ce4c20a04d697e6c98514..bd4825e3449723c3b465d359f484a6a9aa1c1f80 100644 (file)
@@ -164,7 +164,7 @@ void HYDROGUI_ExportFileOp::startOperation()
             QStringList aStricklerTypes;
             if (aNonExpList.empty())
             {
-              HYDROData_LandCoverMap::Iterator aLCMIt( aLCM );
+              HYDROData_LandCoverMap::Explorer aLCMIt( aLCM );
               for( ; aLCMIt.More(); aLCMIt.Next() )
               {
                 QString aST = aLCMIt.StricklerType();
index dc04adb87eb93cca268e372b7463d3f18883ec08..5c87c7327d31ddcf0572e03aa6ac7b7807e3d3cb 100644 (file)
@@ -71,7 +71,7 @@ void HYDROGUI_LandCoverMapPrs::UpdateColors()
     QString aStricklerType = anIt.StricklerType();
     Quantity_Color aColor = GetColor( aStricklerType );
     SetCustomColor( aFace, aColor );
-    SetCustomWidth( aFace, 1.0 );
+     SetCustomWidth( aFace, 1.0 );
   }
 }
 
index 3fd331eb3acf1248a279171595fe1a8c6bd4aa2c..3ed66129a2aee16840ece1d89b7fd1790695b981 100644 (file)
@@ -168,14 +168,15 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll,
   if( theShape.IsNull() )
     return;
 
+  int i = 0;
   if( theShape.ShapeType()==TopAbs_COMPOUND )
   {
     TopExp_Explorer anExplorer( theShape, TopAbs_FACE );
     for( ; anExplorer.More(); anExplorer.Next() ) 
-      ShowShape (anExplorer.Current(), theMode);
+      ShowShape (anExplorer.Current(), theMode, i);
   }
   else
-    ShowShape(theShape, theMode);
+    ShowShape(theShape, theMode, i);
 
 
   if( isFitAll )
@@ -185,20 +186,25 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll,
   }
 }
 
-void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode)
+void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode, int& i)
 {
-  int i = 0;
   if( theShape.ShapeType()==TopAbs_SHELL )
   {
     TopoDS_Iterator anIt( theShape );
-    for( ; anIt.More(); anIt.Next(), i++ )
+    for( ; anIt.More(); anIt.Next())
+    {
       show( anIt.Value(), theMode, false, GetColor(i) );
+      i++;
+    }
   }
   else if (theShape.ShapeType()==TopAbs_FACE ||
            theShape.ShapeType()==TopAbs_WIRE ||
            theShape.ShapeType()==TopAbs_EDGE ||
            theShape.ShapeType()==TopAbs_VERTEX )
-    show( theShape, theMode, false, GetColor(0) );
+  {
+    show( theShape, theMode, false, GetColor(i) );
+    i++;
+  }
 }
 
 bool AreImagesEqual( const QImage& theImage1, const QImage& theImage2, double theTolerance )
index 8d07958e190879078762c4bd0acf0df470436dd1..303ebf4db95a3d75fcc97d7ffb2c7f4cec979ba8 100644 (file)
@@ -38,7 +38,7 @@ public:
                     int theMode, int theSelectionMode, bool isFitAll, const char* theKey );
   static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor );
   static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey );
-  static void ShowShape(const TopoDS_Shape& theShape, int theMode);
+  static void ShowShape(const TopoDS_Shape& theShape, int theMode, int& i);
   static bool AssertImages( QString& theMessage );
   static QColor GetColor(int i);
 
index 7b7d7fcb8545b2bf513aae6f44519a569fb09bf3..4b69df91f00378fbf253f225f9d9634deb7dde80 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png and b/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png differ
index 98152c213ff9aa7e6156d790e86c90c23fb58f02..6a1cddbd3cedc3684ea5b2ba983ebff80e2590aa 100644 (file)
@@ -658,6 +658,7 @@ void test_HYDROData_LandCoverMap::test_add_triangles()
   CPPUNIT_ASSERT_EQUAL( true, aMap->Add( Polyline_4, "" ) );
 
   Handle(HYDROGUI_LandCoverMapPrs) aPrs = new HYDROGUI_LandCoverMapPrs( aMap );
+  TopoDS_Shape aSh = aMap->GetShape();
   TestViewer::show( aPrs, AIS_Shaded, 0, true, "LandCover_Triangles" );
   CPPUNIT_ASSERT_IMAGES