From: asl Date: Wed, 11 Oct 2017 05:21:03 +0000 (+0300) Subject: Merge branch 'BR_1328' into BR_DEMO X-Git-Tag: v2.1~66^2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d73a62c7e1e6715fec59c1dfca7828047279ba9e;p=modules%2Fhydro.git Merge branch 'BR_1328' into BR_DEMO # Conflicts: # src/HYDRO_tests/CMakeLists.txt # src/HYDRO_tests/reference_data/CMakeLists.txt --- d73a62c7e1e6715fec59c1dfca7828047279ba9e diff --cc src/HYDRO_tests/CMakeLists.txt index 82480d51,35d87abf..3c68334a --- a/src/HYDRO_tests/CMakeLists.txt +++ b/src/HYDRO_tests/CMakeLists.txt @@@ -26,7 -25,7 +26,8 @@@ set(PROJECT_HEADER test_Dependencies.h test_HYDROData_DTM.h + test_GraphicsView.h + test_Overview.h TestShape.h TestViewer.h @@@ -56,8 -55,7 +57,9 @@@ set(PROJECT_SOURCE test_HYDROData_Stream.cxx test_Dependencies.cxx test_HYDROData_Tool.cxx + test_GraphicsView.cxx + test_Overview.cxx + test_HYDROGUI_BathymetryPrs.cxx TestShape.cxx TestViewer.cxx diff --cc src/HYDRO_tests/TestViewer.cxx index f3c32152,038ba333..bb76a837 --- a/src/HYDRO_tests/TestViewer.cxx +++ b/src/HYDRO_tests/TestViewer.cxx @@@ -274,16 -272,8 +274,16 @@@ bool TestViewer::AssertImages( QString if( theImage ) anActualImage = *theImage; else - anActualImage = viewWindow()->dumpView(); + anActualImage = viewWindow()->getView(OCCViewer_ViewFrame::MAIN_VIEW)->dumpView(); + const bool SWAP_RGB_ORDER = true; + if( SWAP_RGB_ORDER ) + { + // A temporary patch for bug in SALOME/OCC dump; the result image contains swapped RGB colors + anActualImage = anActualImage.rgbSwapped(); + } + + if( theCase ) myKey = theCase; diff --cc src/HYDRO_tests/TestViewer.h index 54602171,3584ef2d..24dccb63 --- a/src/HYDRO_tests/TestViewer.h +++ b/src/HYDRO_tests/TestViewer.h @@@ -60,11 -60,9 +60,11 @@@ public int theLinesToOmit, QString& theMsg ); + static void setKey( const QString& ); + private: static OCCViewer_ViewManager* myViewManager; - static OCCViewer_ViewWindow* myViewWindow; + static OCCViewer_ViewFrame* myViewWindow; static QString myKey; }; diff --cc src/HYDRO_tests/reference_data/CMakeLists.txt index 663b7227,36f0b5d1..97a6d589 --- a/src/HYDRO_tests/reference_data/CMakeLists.txt +++ b/src/HYDRO_tests/reference_data/CMakeLists.txt @@@ -120,18 -120,14 +120,26 @@@ SET(REFERENCE_DAT pb_1066.cbf f_cmp.brep rebuild_cmp_out.png + garonne.png + gv_fitall.png + gv_zoomed_1.png + gv_zoomed_2.png + bathy.xyz + bathy_prs.png + bathy_selection.png + bathy_rescaled_selection.png + test_zone.brep + overview_empty.png + overview_prs.png + overview_selection.png + overview_zoomed_1.png + overview_zoomed_2.png + overview_panned_1.png + overview_rotated_1.png + bathy_rescaled_user.png + bathy_rescaled_visible.png + bathy_text_labels.png + bathy_prs_fit_selected.png ) # Application tests