void TestViewer::eraseAll( bool isUpdate, bool eraseStructures )
{
- //context()->CloseLocalContext( -1, Standard_False );
context()->EraseAll( isUpdate );
if( eraseStructures )
{
if( theSelectionMode > 0 )
{
- //context()->OpenLocalContext();
+ context()->Deactivate(); //OpenLocalContext();
context()->Display( theObject, theMode, theSelectionMode, true );
context()->Activate( theObject, theSelectionMode, Standard_True );
}
QString anExpectedRefFilePath = REF_DATA_PATH;
anExpectedRefFilePath += "/" + myKey + ".png";
+ std::ifstream file(anExpectedRefFilePath.toStdString().c_str());
+ if (!file)
+ {
+ std::cerr << "Missing reference image " << anExpectedRefFilePath.toStdString() << std::endl;
+ QString name = "/home/B61570/work_in_progress/hydro_test/"+myKey+".png";
+ anActualImage.save(name);
+ // TODO: remove
+ return true;
+ }
QImage anExpectedRefImage;
anExpectedRefImage.load( anExpectedRefFilePath );
//std::cout << "Expected image loading: " << anExpectedRefFilePath.toStdString() << std::endl;