From: isn Date: Fri, 13 Nov 2015 11:36:04 +0000 (+0300) Subject: corrections X-Git-Tag: v1.5~44^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e7325b62fba96a5a6cbc89ee0f57d86f7cc8d6df;p=modules%2Fhydro.git corrections --- diff --git a/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx b/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx index 02f6b2df..bd4825e3 100644 --- a/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx @@ -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(); diff --git a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx index dc04adb8..5c87c732 100644 --- a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx +++ b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx @@ -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 ); } } diff --git a/src/HYDRO_tests/TestViewer.cxx b/src/HYDRO_tests/TestViewer.cxx index 3fd331eb..3ed66129 100644 --- a/src/HYDRO_tests/TestViewer.cxx +++ b/src/HYDRO_tests/TestViewer.cxx @@ -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 ) diff --git a/src/HYDRO_tests/TestViewer.h b/src/HYDRO_tests/TestViewer.h index 8d07958e..303ebf4d 100644 --- a/src/HYDRO_tests/TestViewer.h +++ b/src/HYDRO_tests/TestViewer.h @@ -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); diff --git a/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png b/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png index 7b7d7fcb..4b69df91 100644 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 diff --git a/src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx b/src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx index 98152c21..6a1cddbd 100644 --- a/src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx +++ b/src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx @@ -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