Salome HOME
Merge remote-tracking branch 'origin/pre/IMPS_2016' into BR_HYDRO_IMPS_2016
[modules/hydro.git] / src / HYDRO_tests / TestViewer.cxx
index 904dbc93d0029bd309b6787d226403a825f5914e..64155ea69743222e7e0838adb6bdb85f728a3beb 100644 (file)
@@ -268,7 +268,7 @@ bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, cons
   if( theCase )
     myKey = theCase;
 
-  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test/HYDRO";
+  QString anExpectedRefFilePath = qgetenv( "HYDRO_ROOT_DIR" ) + "/bin/salome/test";
   anExpectedRefFilePath += "/" + myKey + ".png";
   QImage anExpectedRefImage; 
   anExpectedRefImage.load( anExpectedRefFilePath );
@@ -293,6 +293,8 @@ bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, cons
   QString aDiffFilePath = QDir::tempPath() + "/" + myKey + "_diff.png";
   aDiff.save( aDiffFilePath );
 
+  anExpectedRefImage.save( QDir::tempPath() + "/" + myKey + "_1.png");
+
   return false;
 }
 
@@ -344,6 +346,14 @@ void TestViewer::showColorScale( bool isShow )
   }
 }
 
+bool TestViewer::ColorScaleIsDisplayed()
+{
+  Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
+  if( aView.IsNull() )
+    return false;
+  return aView->ColorScaleIsDisplayed();
+}
+
 void TestViewer::select( int theViewX, int theViewY )
 {
   Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();