Salome HOME
refs #1327: implementation of the scaling operations
[modules/hydro.git] / src / HYDRO_tests / test_HYDROGUI_BathymetryPrs.cxx
index 7d2b8b7c0b466c2d12bf06684877807c167a4332..47f4cec2cd5ae06bf9ce9b46f54a024eb99f3fc7 100644 (file)
@@ -42,6 +42,7 @@ void test_HYDROGUI_BathymetryPrs::createBathPrs()
 {
   myBathPrs = new HYDROGUI_ShapeBathymetry( 0, TestViewer::context(), myBath );
   myBathPrs->Build();
+  myBathPrs->getAISObject()->SetAutoHilight( Standard_False );
 
   double min, max;
   myBathPrs->GetRange( min, max );
@@ -112,6 +113,10 @@ void test_HYDROGUI_BathymetryPrs::test_selection()
   TestViewer::setKey( "bathy_selection" );
   CPPUNIT_ASSERT_IMAGES
 
+  select( 5, 5, 6, 6 );
+  TestViewer::setKey( "bathy_prs" );
+  CPPUNIT_ASSERT_IMAGES
+
   //QTest::qWait( 50000 );
 
   aDoc->Close();
@@ -253,6 +258,22 @@ void test_HYDROGUI_BathymetryPrs::test_text_presentation()
   TestViewer::setKey( "bathy_text_labels" );
   CPPUNIT_ASSERT_IMAGES;
 
+  // Disable text labels
+  myBathPrs->TextLabels( false );
+  vp->fitAll();
+  qApp->processEvents();
+  TestViewer::setKey( "bathy_prs" );
+  CPPUNIT_ASSERT_IMAGES;
+
+  // Special case: flag=false + non-empty selection
+  select( x1, y1, x2, y2 );
+  myBathPrs->TextLabels( false );
+  vp->fitAll();
+  qApp->processEvents();
+  TestViewer::setKey( "bathy_prs" );
+  CPPUNIT_ASSERT_IMAGES;
+
+
   //QTest::qWait( 50000 );
 
   aDoc->Close();