aDoc->Close();
TestViewer::eraseAll( true );
}
+
+void test_HYDROGUI_BathymetryPrs::test_fit_on_selected()
+{
+ TestViewer::eraseAll( true );
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ importTestBath( aDoc );
+ TestViewer::showColorScale( false );
+
+ createBathPrs();
+ updateColors();
+
+ Handle(AIS_InteractiveObject) bprs = myBathPrs->getAISObject();
+ CPPUNIT_ASSERT( !bprs.IsNull() );
+
+ TestViewer::show( bprs, 0, 1, true, "bathy_prs" );
+ CPPUNIT_ASSERT_IMAGES;
+
+ // Fit selected points on bathymetry
+ int x1 = 100, y1 = 50, x2 = 250, y2 = 200;
+ select( x1, y1, x2, y2 );
+ TestViewer::viewWindow()->onFitSelection();
+ TestViewer::setKey( "bathy_prs_fit_selected" );
+ CPPUNIT_ASSERT_IMAGES;
+
+ //QTest::qWait( 50000 );
+
+ aDoc->Close();
+ TestViewer::eraseAll( true );
+}
CPPUNIT_TEST( test_rescale_by_visible );
CPPUNIT_TEST( test_text_presentation );
CPPUNIT_TEST( test_rescale_default );
+ CPPUNIT_TEST( test_fit_on_selected );
CPPUNIT_TEST_SUITE_END();
private:
void test_rescale_by_visible();
void test_text_presentation();
void test_rescale_default();
+ void test_fit_on_selected();
private:
Handle(HYDROData_Bathymetry) myBath;